mirror of
https://github.com/postgres/postgres.git
synced 2025-06-22 02:52:08 +03:00
Fix buffer overflow on particularly named files and clarify documentation about
output file naming. Patch by Tsunakawa, Takayuki <tsunakawa.takay@jp.fujitsu.com>
This commit is contained in:
@ -313,7 +313,8 @@ main(int argc, char *const argv[])
|
||||
base_yyout = stdout;
|
||||
else
|
||||
{
|
||||
output_filename = mm_strdup(input_filename);
|
||||
output_filename = mm_alloc(strlen(input_filename) + 3);
|
||||
strcpy(output_filename, input_filename);
|
||||
|
||||
ptr2ext = strrchr(output_filename, '.');
|
||||
/* make extension = .c resp. .h */
|
||||
|
Reference in New Issue
Block a user