Convert sprintf calls to snprintf. From pvaldes.
git-svn-id: svn://svn.code.sf.net/p/bitchx/code/trunk@446 13b04d17-f746-0410-82c6-800466cd88b0
This commit is contained in:
@@ -1398,7 +1398,7 @@ FILE *t;
|
|||||||
if (!do_check_pid)
|
if (!do_check_pid)
|
||||||
return;
|
return;
|
||||||
p = expand_twiddle(DEFAULT_CTOOLZ_DIR);
|
p = expand_twiddle(DEFAULT_CTOOLZ_DIR);
|
||||||
snprintf(pidfile, 79, "%s/pid.%s", p, nickname);
|
snprintf(pidfile, sizeof pidfile, "%s/pid.%s", p, nickname);
|
||||||
if ((t = fopen(pidfile, "r")))
|
if ((t = fopen(pidfile, "r")))
|
||||||
{
|
{
|
||||||
char buffer[80];
|
char buffer[80];
|
||||||
@@ -1424,7 +1424,7 @@ FILE *t;
|
|||||||
if (!do_check_pid)
|
if (!do_check_pid)
|
||||||
return;
|
return;
|
||||||
p = expand_twiddle(DEFAULT_CTOOLZ_DIR);
|
p = expand_twiddle(DEFAULT_CTOOLZ_DIR);
|
||||||
snprintf(pidfile, 79, "%s/pid.%s", p, nickname);
|
snprintf(pidfile, sizeof pidfile, "%s/pid.%s", p, nickname);
|
||||||
if ((t = fopen(pidfile, "r")))
|
if ((t = fopen(pidfile, "r")))
|
||||||
{
|
{
|
||||||
#if !defined(__EMX__) && !defined(WINNT) && !defined(GUI)
|
#if !defined(__EMX__) && !defined(WINNT) && !defined(GUI)
|
||||||
@@ -1434,7 +1434,7 @@ FILE *t;
|
|||||||
if (save_ipc != -1 && (s = get_socket(save_ipc)))
|
if (save_ipc != -1 && (s = get_socket(save_ipc)))
|
||||||
{
|
{
|
||||||
char buf[500];
|
char buf[500];
|
||||||
sprintf(buf, s->server, s->port);
|
snprintf(buf, sizeof buf, s->server, s->port);
|
||||||
unlink(buf);
|
unlink(buf);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -1649,7 +1649,7 @@ int main(int argc, char *argv[], char *envp[])
|
|||||||
|
|
||||||
#ifdef CLOAKED
|
#ifdef CLOAKED
|
||||||
initsetproctitle(argc, argv, envp);
|
initsetproctitle(argc, argv, envp);
|
||||||
sprintf(proctitlestr, CLOAKED);
|
snprintf(proctitlestr, sizeof proctitlestr, CLOAKED);
|
||||||
setproctitle("%s", proctitlestr);
|
setproctitle("%s", proctitlestr);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user