(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:
Assar Westerlund
1997-05-11 09:00:59 +00:00
parent 3a4aa23c56
commit f6f8ab95a3

View File

@@ -32,7 +32,8 @@ pop_msg(POP *p, int stat, char *format, ...)
/* Append the message (formatted, if necessary) */
if (format)
vsprintf(mp,format,ap);
vsnprintf (mp, sizeof(message) - strlen(message),
format, ap);
/* Log the message if debugging is turned on */
#ifdef DEBUG
@@ -45,10 +46,10 @@ pop_msg(POP *p, int stat, char *format, ...)
pop_log(p,POP_PRIORITY,"%s",message);
/* Append the <CR><LF> */
strcat(message, "\r\n");
strncat(message, "\r\n", sizeof(message) - strlen(message));
/* Send the message to the client */
fputs(message,p->output);
fputs(message, p->output);
fflush(p->output);
va_end(ap);