]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Add guard code to protect from buffer overruns on long date/time input
authorThomas G. Lockhart <lockhart@fourpalms.org>
Sun, 4 Aug 2002 06:44:47 +0000 (06:44 +0000)
committerThomas G. Lockhart <lockhart@fourpalms.org>
Sun, 4 Aug 2002 06:44:47 +0000 (06:44 +0000)
commitb71310d8e02f8f0b3006aa5e634f9218f0f0cedc
treeed7c3250bae2f4b46f56910477dcf994287fdadf
parente025bb7a725610e327401d7afacedaad7079b989
Add guard code to protect from buffer overruns on long date/time input
 strings. Should go back in and look at doing this a bit more elegantly
 and (hopefully) cheaper. Probably not too bad anyway, but it seems a
 shame to scan the strings twice: once for length for this buffer overrun
 protection, and once to parse the line.
Remove use of pow() in date/time handling; was already gone from everything
 *but* the time data types.
Define macros for handling typmod manipulation for date/time types.
 Should be more robust than all of that brute-force inline code.
Rename macros for masking and typmod manipulation to put TIMESTAMP_
 or INTERVAL_ in front of the macro name, to reduce the possibility
 of name space collisions.
src/backend/utils/adt/date.c
src/backend/utils/adt/datetime.c
src/backend/utils/adt/format_type.c
src/backend/utils/adt/nabstime.c
src/backend/utils/adt/timestamp.c
src/backend/utils/adt/varlena.c