postgresql/src
Tom Lane a9f0dbc39d Fix PQsetvalue() to avoid possible crash when adding a new tuple.
PQsetvalue unnecessarily duplicated the logic in pqAddTuple, and didn't
duplicate it exactly either --- pqAddTuple does not care what is in the
tuple-pointer array positions beyond the last valid entry, whereas the
code in PQsetvalue assumed such positions would contain NULL.  This led
to possible crashes if PQsetvalue was applied to a PGresult that had
previously been enlarged with pqAddTuple, for instance one built from a
server query.  Fix by relying on pqAddTuple instead of duplicating logic,
and not assuming anything about the contents of res->tuples[res->ntups].

Back-patch to 8.4, where PQsetvalue was introduced.

Andrew Chernow
2011-07-21 12:24:14 -04:00
..
backend Make xpath() do something useful with XPath expressions that return scalars. 2011-07-21 11:32:46 -04:00
bin Support SECURITY LABEL on databases, tablespaces, and roles. 2011-07-20 13:18:24 -04:00
include Support SECURITY LABEL on databases, tablespaces, and roles. 2011-07-20 13:18:24 -04:00
interfaces Fix PQsetvalue() to avoid possible crash when adding a new tuple. 2011-07-21 12:24:14 -04:00
makefiles Use single quotes in preference to double quotes for protecting pathnames. 2011-06-15 21:45:23 -04:00
pl Add GET STACKED DIAGNOSTICS plpgsql command to retrieve exception info. 2011-07-18 14:47:18 -04:00
port Add \ir command to psql. 2011-07-06 11:45:13 -04:00
template Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
test Make xpath() do something useful with XPath expressions that return scalars. 2011-07-21 11:32:46 -04:00
timezone Pgindent run before 9.1 beta2. 2011-06-09 14:32:50 -04:00
tools Blind attempt at fixing isolation_tester on Win32 2011-07-13 01:10:26 -04:00
tutorial Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
.gitignore Convert cvsignore to gitignore, and add .gitignore for build targets. 2010-09-22 12:57:04 +02:00
DEVELOPERS Replace a couple of references to files that no longer exist in the source 2009-05-04 08:08:47 +00:00
Makefile Fix some oversights in distprep and maintainer-clean targets. 2011-03-10 00:04:05 -05:00
Makefile.global.in Make distprep and *clean build targets recurse into all subdirectories. 2011-07-03 13:55:12 -04:00
Makefile.shlib Use single quotes in preference to double quotes for protecting pathnames. 2011-06-15 21:45:23 -04:00
bcc32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
nls-global.mk Add the possibility to pass --flag arguments to xgettext calls 2011-06-27 00:37:21 +03:00
win32.mak Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00