- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit3977bd2
committed
In fmtIdEnc(), handle failure of enlargePQExpBuffer().
Coverity complained that we weren't doing that, and it's right.This fix just makes fmtIdEnc() honor the general convention that OOMcauses a PQExpBuffer to become marked "broken", without any immediateerror. In the pretty-unlikely case that we actually did hit OOM here,the end result would be to return an empty string to the caller,probably resulting in invalid SQL syntax in an issued command (ifnothing else went wrong, which is even more unlikely). It's temptingto throw an "out of memory" error if the buffer becomes broken, butthere's not a lot of point in doing that only here and not in hundredsof other PQExpBuffer-using places in pg_dump and similar callers.The whole issue could do with some non-time-crunched redesign, perhaps.This is a followup to the fixes forCVE-2025-1094, and should beincluded if cherry-picking those fixes.1 parent3abe6e0 commit3977bd2
1 file changed
+7
-5
lines changedLines changed: 7 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
200 | 200 |
| |
201 | 201 |
| |
202 | 202 |
| |
203 |
| - | |
204 |
| - | |
205 |
| - | |
206 |
| - | |
207 |
| - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
208 | 210 |
| |
209 | 211 |
| |
210 | 212 |
| |
|
0 commit comments
Comments
(0)