[ecpg bug]: can not use single '*' in multi-line comment after c preprocessor directives

2024-09-25 Thread Winter Loo
Hi hackers, The following code fails to pass the ecpg compilation, although it is accepted by the gcc compiler. ``` #if ABC /* this is a multi-line * comment including single star character */ int a = 1; #endif ``` The issue arises from the first '*' in the second line. Upon it

Re:Re: may be a buffer overflow problem

2024-06-14 Thread Winter Loo
>Thanks for looking! I will apply it backpatched all the way down as this has >been wrong since 2006. > >> I wonder how Winter Loo got to see that warning... > I was compiling source code of postgres version 13 and the building flags is changed in my development environment

may be a buffer overflow problem

2024-06-14 Thread Winter Loo
Hi hackers, I am using gcc version 11.3.0 to compile postgres source code. Gcc complains about the following line: ```c strncpy(sqlca->sqlstate, "YE001", sizeof(sqlca->sqlstate)); ``` with error as: misc.c:529:17: error: ‘strncpy’ output truncated before terminating nul copying 5 bytes fr