]> granicus.if.org Git - postgresql/commit
Avoid potential buffer overflow crash
authorPeter Eisentraut <peter_e@gmx.net>
Sat, 23 Nov 2013 12:25:37 +0000 (07:25 -0500)
committerPeter Eisentraut <peter_e@gmx.net>
Sat, 23 Nov 2013 12:30:45 +0000 (07:30 -0500)
commit654e006bbaa00610055273e1e08723b1f63ea6ce
treed7ca0df87873a4624c4ec8076b91483420710d5a
parentc0aa210f6ebab06ca3933c735c7c6d2b8bdd024e
Avoid potential buffer overflow crash

A pointer to a C string was treated as a pointer to a "name" datum and
passed to SPI_execute_plan().  This pointer would then end up being
passed through datumCopy(), which would try to copy the entire 64 bytes
of name data, thus running past the end of the C string.  Fix by
converting the string to a proper name structure.

Found by LLVM AddressSanitizer.
src/backend/utils/adt/ruleutils.c