- Notifications
You must be signed in to change notification settings - Fork5
Commit9d91cd8
committed
Fix latent crash in do_text_output_multiline().
do_text_output_multiline() would fail (typically with a null pointerdereference crash) if its input string did not end with a newline. Suchcases do not arise in our current sources; but it certainly could happenin future, or in extension code's usage of the function, so we should fixit. To fix, replace "eol += len" with "eol = text + len".While at it, make two cosmetic improvements: mark the input string const,and rename the argument from "text" to "txt" to dodge pgindent strangeness(since "text" is a typedef name).Even though this problem is only latent at present, it seems like a goodidea to back-patch the fix, since it's a very simple/safe patch and it'snot out of the realm of possibility that we might in future back-patchsomething that expects sane behavior from do_text_output_multiline().Per report from Hao Lee.Report: <CAGoxFiFPAGyPAJLcFxTB5cGhTW2yOVBDYeqDugYwV4dEd1L_Ag@mail.gmail.com>1 parent7fc5064 commit9d91cd8
File tree
2 files changed
+10
-11
lines changed- src
- backend/executor
- include/executor
2 files changed
+10
-11
lines changedLines changed: 9 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1325 | 1325 |
| |
1326 | 1326 |
| |
1327 | 1327 |
| |
1328 |
| - | |
| 1328 | + | |
1329 | 1329 |
| |
1330 | 1330 |
| |
1331 | 1331 |
| |
1332 | 1332 |
| |
1333 |
| - | |
| 1333 | + | |
1334 | 1334 |
| |
1335 |
| - | |
| 1335 | + | |
1336 | 1336 |
| |
1337 | 1337 |
| |
1338 |
| - | |
| 1338 | + | |
1339 | 1339 |
| |
1340 | 1340 |
| |
1341 |
| - | |
1342 |
| - | |
| 1341 | + | |
1343 | 1342 |
| |
1344 | 1343 |
| |
1345 | 1344 |
| |
1346 | 1345 |
| |
1347 |
| - | |
1348 |
| - | |
| 1346 | + | |
| 1347 | + | |
1349 | 1348 |
| |
1350 | 1349 |
| |
1351 |
| - | |
| 1350 | + | |
1352 | 1351 |
| |
1353 | 1352 |
| |
1354 |
| - | |
| 1353 | + | |
1355 | 1354 |
| |
1356 | 1355 |
| |
1357 | 1356 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
283 | 283 |
| |
284 | 284 |
| |
285 | 285 |
| |
286 |
| - | |
| 286 | + | |
287 | 287 |
| |
288 | 288 |
| |
289 | 289 |
| |
|
0 commit comments
Comments
(0)