Commit Graph

2922 Commits

Author SHA1 Message Date
48fcbb803b Fix a couple of places that would loop forever if attempts to read a stdio file
set ferror() but never set feof().  This is known to be the case for recent
glibc when trying to read a directory as a file, and might be true for other
platforms/cases too.  Per report from Ed L.  (There is more that we ought to
do about his report, but this is one easily identifiable issue.)
2010-03-03 20:31:29 +00:00
2de646cd8f Set errno to zero before invoking SSL_read or SSL_write. It appears that
at least in some Windows versions, these functions are capable of returning
a failure indication without setting errno.  That puts us into an infinite
loop if the previous value happened to be EINTR.  Per report from Brendan
Hill.

Back-patch to 8.2.  We could take it further back, but since this is only
known to be an issue on Windows and we don't support Windows before 8.2,
it does not seem worth the trouble.
2009-12-30 03:46:08 +00:00
0cea93188e tag 8.2.15 2009-12-10 03:09:47 +00:00
0a699bf3aa Reject certificates with embedded NULLs in the commonName field. This stops
attacks where an attacker would put <attack>\0<propername> in the field and
trick the validation code that the certificate was for <attack>.

This is a very low risk attack since it reuqires the attacker to trick the
CA into issuing a certificate with an incorrect field, and the common
PostgreSQL deployments are with private CAs, and not external ones. Also,
default mode in 8.4 does not do any name validation, and is thus also not
vulnerable - but the higher security modes are.

Backpatch all the way. Even though versions 8.3.x and before didn't have
certificate name validation support, they still exposed this field for
the user to perform the validation in the application code, and there
is no way to detect this problem through that API.

Security: CVE-2009-4034
2009-12-09 06:37:21 +00:00
8587a26b1a Remove outside-the-scanner references to "yyleng".
It seems the flex developers have decided to change yyleng from int to size_t.
This has already happened in the latest release of OS X, and will start
happening elsewhere once the next release of flex appears.  Rather than trying
to divine how it's declared in any particular build, let's just remove the one
existing not-very-necessary external usage.

Back-patch to all supported branches; not so much because users in the field
are likely to care about building old branches with cutting-edge flex, as
to keep OSX-based buildfarm members from having problems with old branches.
2009-09-08 04:25:41 +00:00
9b0a50e61c Tag 8.2.14 2009-09-04 01:16:34 +00:00
342dd034b9 Translation updates 2009-09-03 19:17:42 +00:00
7e23229904 tag 8.2.13 2009-03-13 02:16:43 +00:00
fbb70ccd60 tag 8.2.12 2009-01-30 03:13:35 +00:00
3364386166 Go over all OpenSSL return values and make sure we compare them
to the documented API value. The previous code got it right as
it's implemented, but accepted too much/too little compared to
the API documentation.

Per comment from Zdenek Kotala.
2009-01-28 15:06:55 +00:00
400e915c62 tag 8.2.11 2008-10-31 02:44:09 +00:00
a137de44b4 Translation updates 2008-10-30 20:12:35 +00:00
cd8584611a Optional arguments should be optional. 2008-10-10 12:19:47 +00:00
6967e894fd tag for 8.2.10 2008-09-19 03:12:08 +00:00
7ddd839647 Make libpq on windows not try to send chunks larger than 64Kb.
Per Microsoft knowledge base article Q201213, early versions of
Windows fail when we do this. Later versions of Windows appear
to have a higher limit than 64Kb, but do still fail on large
sends, so we unconditionally limit it for all versions.

Patch from Tom Lane.
2008-08-20 11:53:49 +00:00
ea83cc1f98 Stamp 8.2.9 (except for configure.in/configure) 2008-06-08 22:14:31 +00:00
f0f335eddb Stamp 8.2.8 (except for configure.in/configure) 2008-06-05 23:55:50 +00:00
2c04e1f392 Translation updates. 2008-06-05 23:36:58 +00:00
52e3b0e90e Added SQL to list of allowed variable names. 2008-06-04 12:27:30 +00:00
4b87bfaaba Add more dependencies from libpgport required by
standalone msvc build of libpq.

Hiroshi Saito
2008-05-05 19:31:43 +00:00
79522dfb35 Avoid using unnecessary pgwin32_safestat in libpq. 2008-04-16 14:24:38 +00:00
309b717462 Fixed bug in PGTYPEStimestamp_sub that used pointers instead of the values to substract. 2008-04-10 10:45:39 +00:00
2fec466326 Translation updates 2008-03-14 04:51:31 +00:00
3dbe7e40ee Stamp version 8.2.7, except for configure.in/configure. 2008-03-13 23:58:25 +00:00
1558a043ab Fix uninstall target. 2008-02-26 13:49:27 +00:00
f8dc95540e EXECUTE can return NOT FOUND so it should be checked here too. 2008-02-14 14:57:29 +00:00
1d3c2343b8 Added SQLSTATE macro closing bug #3961. 2008-02-14 12:38:27 +00:00
dcd462a9c0 Fix an ancient oversight in libpq's handling of V3-protocol COPY OUT mode:
we need to be able to swallow NOTICE messages, and potentially also
ParameterStatus messages (although the latter would be a bit weird),
without exiting COPY OUT state.  Fix it, and adjust the protocol documentation
to emphasize the need for this.  Per off-list report from Alexander Galler.
2008-01-14 18:46:25 +00:00
e29972bb56 Stamp release 8.2.6.
Security: CVE-2007-4769, CVE-2007-4772, CVE-2007-6067, CVE-2007-6600, CVE-2007-6601
2008-01-03 21:40:50 +00:00
8ed5d45820 Add win32error.c to libpq, needed to resolve _dosmaperr. 2007-11-30 16:21:22 +00:00
635372ebc0 Fixed two parser bugs. 2007-11-06 08:32:34 +00:00
a948f7c62c Don't try to free pgpassfile since it's a stack variable.
Martin Pitt
2007-10-09 15:03:31 +00:00
cfa22b8d20 Translation updates 2007-09-13 21:15:37 +00:00
5dc3723781 Stamp releases 8.2.5, 8.1.10, 8.0.14, 7.4.18, 7.3.20.
Update FAQs for 8.2.5.
2007-09-11 17:37:30 +00:00
4eaf0e311d Fixed bug in Informix define handling. 2007-08-29 13:58:34 +00:00
de507ed565 The correct min buffer size is
INITIAL_EXPBUFFER_SIZE, not PQERRORMSG_LENGTH.

Backpatch only, the proper fix in HEAD is
to use PQExpBuffers everywhere.
2007-07-23 18:13:10 +00:00
c7cca1c8f7 Fix freenig of names in Kerberos when using MIT - need to use the
free function provided in the Kerberos library.
This fixes a very hard to track down heap corruption on windows
when using debug runtimes.
2007-07-12 14:13:06 +00:00
08629a2d60 Removed errant ISODOW 2007-05-21 14:57:07 +00:00
87304ef621 Backported fix from HEAD that removes superfluous function Vista has a problem with 2007-05-21 07:10:23 +00:00
9c35b136f1 Removed non-existant function from extern.h 2007-04-27 07:55:22 +00:00
1b87b4474f Inlined two functions to get rid of va_list prolems on some archs. 2007-04-27 06:58:17 +00:00
90e4b46998 Stamp releases 8.2.4, 8.1.9, 8.0.13, 7.4.17, 7.3.19. 2007-04-19 03:07:32 +00:00
d3753aad55 Translation updates 2007-04-18 20:01:39 +00:00
2dd336bba5 Fix typo, ensable -> enable, per Steve Gieseking. 2007-03-27 03:25:35 +00:00
5ea7b175f6 Remove unsafe calling of WSAStartup and WSACleanup from DllMain. Move the
inline cleanup call around so it will be called in the right order, and
be called on errors.

Per report from Tokuharu Yuzawa.
2007-03-08 19:27:48 +00:00
bde73ab21a Backported bug fix for #2956. 2007-02-27 13:27:13 +00:00
98e08d1aa0 Stamp releases 8.2.3, 8.1.8, 8.0.12. No release notes yet. 2007-02-07 03:48:58 +00:00
33623b51b6 Backported regression test changes from HEAD so the buildfarm hopefully gets green again. 2007-02-06 10:48:28 +00:00
b8dd3a8604 Backported va_list handling cleanup 2007-02-06 09:41:44 +00:00
d06a16c589 Stamp release 8.2.2.
Security: CVE-2007-0555, CVE-2007-0556
2007-02-02 00:14:22 +00:00