Don't use ordinary NULL-terminated strings as Name datums.

Noah Misch <noah@leadboat.com>

Commit: ff53890f687c7f6b2a10db6661e9c32faf832636
Author: Noah Misch <noah@leadboat.com>
Date: 2013-06-12T23:49:50Z
Releases: 9.3.0
Don't use ordinary NULL-terminated strings as Name datums.

Consumers are entitled to read the full 64 bytes pertaining to a Name;
using a shorter NULL-terminated string leads to reading beyond the end
its allocation; a SIGSEGV is possible.  Use the frequent idiom of
copying to a NameData on the stack.  New in 9.3, so no back-patch.

Files

PathChange+/−
src/backend/commands/alter.c modified +3 −1
src/backend/commands/event_trigger.c modified +6 −2