]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix array overrun in ecpg's version of ParseDateTime().
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 7 Oct 2014 01:23:20 +0000 (21:23 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 7 Oct 2014 01:23:35 +0000 (21:23 -0400)
commitd3cfe20c6dc498f9294d07c7803a8cc776f8db31
tree74cb0d410014c63f876ffa11ea0ef70af8801b5a
parent3cd085ee251ba1499a3dd94cbea809fe4bdc55a5
Fix array overrun in ecpg's version of ParseDateTime().

The code wrote a value into the caller's field[] array before checking
to see if there was room, which of course is backwards.  Per report from
Michael Paquier.

I fixed the equivalent bug in the backend's version of this code way back
in 630684d3a130bb93, but failed to think about ecpg's copy.  Fortunately
this doesn't look like it would be exploitable for anything worse than a
core dump: an external attacker would have no control over the single word
that gets written.
src/interfaces/ecpg/pgtypeslib/dt_common.c