Skip site navigation (1) Skip section navigation (2)

[PATCH] Sprintf() patch against current CVS tree.

From: Jukka Holappa <jukkaho(at)mail(dot)student(dot)oulu(dot)fi>
To: pgsql-hackers(at)postgresql(dot)org
Subject: [PATCH] Sprintf() patch against current CVS tree.
Date: 2002-08-29 21:29:03
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Hash: SHA1


I checked all the previous string handling errors and most of them were
already fixed by You. However there were a few left and this 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.

This patch also passes all regression testing:
~  All 89 tests passed.

Patch is in -c format as requested and available from

I tried to send it as attachment, but seems like nothing went through
(and my mailer would certainly mangle an inline patch).

- - Jukka

Version: GnuPG v1.0.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla -


pgsql-hackers by date

Next:From: Bruce MomjianDate: 2002-08-29 21:45:56
Subject: Re: fix for palloc() of user-supplied length
Previous:From: Jukka HolappaDate: 2002-08-29 21:12:22
Subject: [PATCH] Sprintf() patch against current CVS tree.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group