Skip to content

Commit

Permalink
conflicts resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
Parikshit Sarode committed Oct 18, 2023
1 parent 0274e1d commit 2175bed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/babelfishpg_tsql/runtime/functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,14 +225,14 @@ babelfish_concat_wrapper(PG_FUNCTION_ARGS)
arg1_size = VARSIZE_ANY_EXHDR(arg1);
arg2_size = VARSIZE_ANY_EXHDR(arg2);

if((arg1_size>0)&&(arg2_size>0)&&((arg1_size + VARHDRSZ ) > INT_MAX - arg2_size))
if((arg1_size > 0) && (arg2_size > 0) && ((arg1_size) > INT_MAX - arg2_size))
{
//overflow detected
ereport(ERROR,
(errcode(ERRCODE_NUMERIC_VALUE_OUT_OF_RANGE),
errmsg("value overflows numeric format while adding")));
}
else if((arg1_size < 0) && (arg2_size < 0) && ((arg1_size + VARHDRSZ ) < INT_MIN - arg2_size))
else if((arg1_size < 0) && (arg2_size < 0) && ((arg1_size) < INT_MIN - arg2_size))
{
//underflow detected
ereport(ERROR,
Expand Down

0 comments on commit 2175bed

Please sign in to comment.