|
62 | 62 | * causing nasty effects. |
63 | 63 | **************************************************************/ |
64 | 64 |
|
65 | | -/*static char _id[] = "$PostgreSQL: pgsql/src/port/snprintf.c,v 1.25 2005/03/2003:53:39 momjian Exp $";*/ |
| 65 | +/*static char _id[] = "$PostgreSQL: pgsql/src/port/snprintf.c,v 1.26 2005/03/2013:54:53 momjian Exp $";*/ |
66 | 66 |
|
67 | 67 | staticvoiddopr(char*buffer,constchar*format,va_listargs,char*end); |
68 | 68 |
|
@@ -225,6 +225,7 @@ dopr(char *buffer, const char *format, va_list args, char *end) |
225 | 225 | if (*p=='%')/* counts %% as two, so overcounts */ |
226 | 226 | percents++; |
227 | 227 |
|
| 228 | +/* Need to use malloc() because memory system might not be started yet. */ |
228 | 229 | if ((fmtpar=malloc(sizeof(structfmtpar)*percents))==NULL) |
229 | 230 | { |
230 | 231 | fprintf(stderr,_("out of memory\n")); |
|