(pop_msg): replaced vsprintf with vsnprintf
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@1700 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -32,7 +32,8 @@ pop_msg(POP *p, int stat, char *format, ...)
|
|||||||
|
|
||||||
/* Append the message (formatted, if necessary) */
|
/* Append the message (formatted, if necessary) */
|
||||||
if (format)
|
if (format)
|
||||||
vsprintf(mp,format,ap);
|
vsnprintf (mp, sizeof(message) - strlen(message),
|
||||||
|
format, ap);
|
||||||
|
|
||||||
/* Log the message if debugging is turned on */
|
/* Log the message if debugging is turned on */
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
@@ -45,10 +46,10 @@ pop_msg(POP *p, int stat, char *format, ...)
|
|||||||
pop_log(p,POP_PRIORITY,"%s",message);
|
pop_log(p,POP_PRIORITY,"%s",message);
|
||||||
|
|
||||||
/* Append the <CR><LF> */
|
/* Append the <CR><LF> */
|
||||||
strcat(message, "\r\n");
|
strncat(message, "\r\n", sizeof(message) - strlen(message));
|
||||||
|
|
||||||
/* Send the message to the client */
|
/* Send the message to the client */
|
||||||
fputs(message,p->output);
|
fputs(message, p->output);
|
||||||
fflush(p->output);
|
fflush(p->output);
|
||||||
|
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
|
Reference in New Issue
Block a user