ecpg: fix more minor mishandling of bad input in preprocessor.
Tom Lane <tgl@sss.pgh.pa.us>
ecpg: fix more minor mishandling of bad input in preprocessor. Don't get confused by an unmatched right brace in the input. (Previously, this led to discarding information about file-level variables and then possibly crashing.) Detect, rather than crash on, an attempt to index into a non-array variable. As before, in the absence of field complaints I'm not too excited about back-patching these. Per valgrind testing by Alexander Lakhin. Discussion: https://postgr.es/m/a239aec2-6c79-5fc9-9272-cea41158a360@gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/interfaces/ecpg/preproc/ecpg.trailer | modified | +8 −5 |
| src/interfaces/ecpg/preproc/variable.c | modified | +2 −1 |
Discussion
- ECPG cleanup and fix for clang compile-time problem 25 messages · 2024-04-19 → 2024-11-27