- Notifications
You must be signed in to change notification settings - Fork5
Commit65da0d6
committed
Fix misuse of StrNCpy to copy and add null to non-null-terminated data.
Does not work since it fetches one byte beyond the source data, and whenthe phase of the moon is wrong, the source data is smack up against theend of backend memory and you get SIGSEGV. Don't laugh, this is a fixfor an actual user bug report.1 parentde85dd1 commit65da0d6
File tree
9 files changed
+56
-43
lines changed- contrib/miscutil
- src
- backend
- libpq
- port/dynloader
- utils/adt
- include
9 files changed
+56
-43
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
99 | 99 |
| |
100 | 100 |
| |
101 | 101 |
| |
| 102 | + | |
102 | 103 |
| |
103 |
| - | |
104 |
| - | |
| 104 | + | |
105 | 105 |
| |
106 | 106 |
| |
107 | 107 |
| |
|
Lines changed: 11 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
379 | 379 |
| |
380 | 380 |
| |
381 | 381 |
| |
382 |
| - | |
383 |
| - | |
384 |
| - | |
385 |
| - | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
386 | 387 |
| |
387 | 388 |
| |
388 |
| - | |
389 | 389 |
| |
390 | 390 |
| |
391 |
| - | |
392 | 391 |
| |
393 | 392 |
| |
394 | 393 |
| |
395 | 394 |
| |
396 | 395 |
| |
397 | 396 |
| |
398 |
| - | |
399 | 397 |
| |
400 | 398 |
| |
401 |
| - | |
402 | 399 |
| |
403 | 400 |
| |
404 | 401 |
| |
| |||
461 | 458 |
| |
462 | 459 |
| |
463 | 460 |
| |
464 |
| - | |
465 |
| - | |
466 |
| - | |
467 |
| - | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
468 | 466 |
| |
469 | 467 |
| |
470 | 468 |
| |
471 | 469 |
| |
472 |
| - | |
473 | 470 |
| |
474 | 471 |
| |
475 |
| - | |
476 | 472 |
| |
477 | 473 |
| |
478 | 474 |
| |
|
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 |
| - | |
| 12 | + | |
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| |||
236 | 236 |
| |
237 | 237 |
| |
238 | 238 |
| |
239 |
| - | |
240 |
| - | |
| 239 | + | |
| 240 | + | |
241 | 241 |
| |
242 | 242 |
| |
243 | 243 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
536 | 536 |
| |
537 | 537 |
| |
538 | 538 |
| |
539 |
| - | |
| 539 | + | |
| 540 | + | |
540 | 541 |
| |
541 | 542 |
| |
542 | 543 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
14 |
| - | |
| 14 | + | |
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
| |||
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
51 |
| - | |
| 51 | + | |
| 52 | + | |
52 | 53 |
| |
53 | 54 |
| |
54 | 55 |
| |
|
Lines changed: 7 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
52 | 52 |
| |
53 | 53 |
| |
54 | 54 |
| |
55 |
| - | |
56 |
| - | |
57 |
| - | |
58 |
| - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
59 | 61 |
| |
60 | 62 |
| |
61 | 63 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
164 | 164 |
| |
165 | 165 |
| |
166 | 166 |
| |
167 |
| - | |
| 167 | + | |
| 168 | + | |
168 | 169 |
| |
169 | 170 |
| |
170 | 171 |
| |
|
Lines changed: 11 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
115 | 115 |
| |
116 | 116 |
| |
117 | 117 |
| |
| 118 | + | |
118 | 119 |
| |
119 | 120 |
| |
120 |
| - | |
| 121 | + | |
| 122 | + | |
121 | 123 |
| |
122 | 124 |
| |
123 | 125 |
| |
| |||
268 | 270 |
| |
269 | 271 |
| |
270 | 272 |
| |
271 |
| - | |
272 |
| - | |
| 273 | + | |
| 274 | + | |
273 | 275 |
| |
274 | 276 |
| |
275 | 277 |
| |
| |||
284 | 286 |
| |
285 | 287 |
| |
286 | 288 |
| |
287 |
| - | |
| 289 | + | |
288 | 290 |
| |
289 | 291 |
| |
290 | 292 |
| |
| |||
316 | 318 |
| |
317 | 319 |
| |
318 | 320 |
| |
319 |
| - | |
| 321 | + | |
320 | 322 |
| |
321 | 323 |
| |
322 | 324 |
| |
| |||
365 | 367 |
| |
366 | 368 |
| |
367 | 369 |
| |
| 370 | + | |
368 | 371 |
| |
369 | 372 |
| |
370 |
| - | |
| 373 | + | |
| 374 | + | |
371 | 375 |
| |
372 | 376 |
| |
373 | 377 |
| |
|
Lines changed: 14 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
781 | 781 |
| |
782 | 782 |
| |
783 | 783 |
| |
784 |
| - | |
785 |
| - | |
786 |
| - | |
787 |
| - | |
788 |
| - | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
789 | 797 |
| |
790 | 798 |
| |
791 | 799 |
| |
|
0 commit comments
Comments
(0)