Use snprintf rather than sprintf. From pvaldes.

git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@431 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
Tim Cava
2013-11-07 02:41:16 +00:00
parent 590ae4c685
commit 276fd24258
41 changed files with 623 additions and 222 deletions

View File

@@ -203,7 +203,7 @@ static int i = 0;
if (i == 4)
i = 0;
}
sprintf(ret_str, "%c", this[i]);
snprintf(ret_str, sizeof ret_str, "%c", this[i]);
return ret_str;
#else
@@ -216,7 +216,7 @@ static int i = 0;
reset_display_target();
if (i == 4)
i = 0;
sprintf(ret_str, "%c", this[i++]);
snprintf(ret_str, sizeof ret_str, "%c", this[i++]);
case 1:
if (!*ret_str)
return NULL;
@@ -246,7 +246,7 @@ static int i = 0;
}
old_count = count;
sprintf(ret_str, "%d", old_count);
snprintf(ret_str, sizeof ret_str, "%d", old_count);
return ret_str;
#else
FILE *mail;
@@ -277,7 +277,7 @@ static int i = 0;
}
old_count = count;
sprintf(ret_str, "%d", old_count);
snprintf(ret_str, sizeof ret_str, "%d", old_count);
}
case 1:
if (*ret_str)