postgresql/src
Tom Lane 0e924c007d Fix lo_read, lo_write, lo_truncate to cope with "size_t" length parameters.
libpq defines these functions as accepting "size_t" lengths ... but the
underlying backend functions expect signed int32 length parameters, and so
will misinterpret any value exceeding INT_MAX.  Fix the libpq side to throw
error rather than possibly doing something unexpected.

This is a bug of long standing, but I doubt it's worth back-patching.  The
problem is really pretty academic anyway with lo_read/lo_write, since any
caller expecting sane behavior would have to have provided a multi-gigabyte
buffer.  It's slightly more pressing with lo_truncate, but still we haven't
supported large objects over 2GB until now.
2012-10-08 21:19:53 -04:00
..
backend Remove generation of repl_gram.h 2012-10-08 20:36:46 -04:00
bin Work around unportable behavior of malloc(0) and realloc(NULL, 0). 2012-10-02 17:32:42 -04:00
include Code review for 64-bit-large-object patch. 2012-10-08 18:24:32 -04:00
interfaces Fix lo_read, lo_write, lo_truncate to cope with "size_t" length parameters. 2012-10-08 21:19:53 -04:00
makefiles
pl PL/pgSQL: rename gram.y to pl_gram.y 2012-10-04 22:40:33 -04:00
port Remove redundant code for getnameinfo() replacement 2012-10-04 21:45:14 -04:00
template Disable _FORTIFY_SOURCE with ICC 2012-09-29 20:07:36 -04:00
test Code review for 64-bit-large-object patch. 2012-10-08 18:24:32 -04:00
timezone Update time zone data files to tzdata release 2012f. 2012-09-19 10:44:45 -04:00
tools Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
tutorial
.gitignore
bcc32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
DEVELOPERS
Makefile
Makefile.global.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
Makefile.shlib Remove configure flag --disable-shared, as it is no longer used by any 2012-08-30 16:26:53 -04:00
nls-global.mk
win32.mak Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00