forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit92375ed
committed
Fix bogus code in contrib/ tsearch dictionary examples.
Both dict_int and dict_xsyn were blithely assuming that whatever memorypalloc gives back will be pre-zeroed. This would typically work forjust about long enough to run their regression tests, and no longer :-(.The pre-9.0 code in dict_xsyn was even lamer than that, as it wouldhappily give back a pointer to the result of palloc(0), encouragingits caller to access off the end of memory. Again, this would justbarely fail to fail as long as memory contained nothing but zeroes.Per a report from Rodrigo Hjort that code based on these examplesdidn't work reliably.1 parent1819a37 commit92375ed
2 files changed
+3
-1
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
73 | 73 |
| |
74 | 74 |
| |
75 | 75 |
| |
76 |
| - | |
| 76 | + | |
77 | 77 |
| |
78 | 78 |
| |
79 | 79 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
245 | 245 |
| |
246 | 246 |
| |
247 | 247 |
| |
| 248 | + | |
| 249 | + | |
248 | 250 |
| |
249 | 251 |
| |
250 | 252 |
| |
|
0 commit comments
Comments
(0)