Skip to content

Commit

Permalink
Updated size of result to MAXDATELEN + 1 to avoid overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
basasairohan committed Jun 10, 2024
1 parent 095e28d commit 9ecb852
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion contrib/babelfishpg_common/src/datetime.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ check_regex_for_text_month(char *str, DateTimeContext context)
char*
clean_input_str(char *str, bool *contains_extra_spaces, DateTimeContext context)
{
char *result = (char *) palloc(MAXDATELEN);
char *result = (char *) palloc(MAXDATELEN + 1);
int i = 0, j = 0;
int last_non_space = -1;
int num_colons = 0;
Expand Down

0 comments on commit 9ecb852

Please sign in to comment.