1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

I checked all the previous string handling errors and most of them were

already fixed by You. However there were a few left and attached patch
should fix the rest of them.

I used StringInfo only in 2 places and both of them are inside debug
ifdefs. Only performance penalty will come from using strlen() like all
the other code does.

I also modified some of the already patched parts by changing
snprintf(buf, 2 * BUFSIZE, ... style lines to
snprintf(buf, sizeof(buf), ... where buf is an array.

Jukka Holappa
This commit is contained in:
Bruce Momjian
2002-09-02 06:11:43 +00:00
parent 48e1a39924
commit a12b4e279b
16 changed files with 107 additions and 105 deletions

View File

@ -164,8 +164,9 @@ int cube_yyerror ( char *msg ) {
position = parse_buffer_pos() > parse_buffer_size() ? parse_buffer_pos() - 1 : parse_buffer_pos();
sprintf(
snprintf(
buf,
256,
"%s at or before position %d, character ('%c', \\%03o), input: '%s'\n",
msg,
position,