1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-07 00:36:50 +03:00

Some security, since we now have vsnprintf, I remade an old patch

with some extra ugly sprintfs fixed. More work in this area is
   needed still.

Göran Thyni
This commit is contained in:
Bruce Momjian
1999-01-01 04:48:49 +00:00
parent d8ae7ffb2f
commit f0fbd7b87e
5 changed files with 15 additions and 18 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.35 1998/09/01 04:33:07 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.36 1999/01/01 04:48:45 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -133,7 +133,7 @@ elog(int lev, const char *fmt,...)
else
*bp++ = *cp;
*bp = '\0';
vsprintf(line, buf, ap);
vsnprintf(line, ELOG_MAXLEN - 1, buf, ap);
va_end(ap);
#ifdef USE_SYSLOG