Commit ca76a39
committed
Protect GIST logic that assumes penalty values can't be negative.
Apparently sane-looking penalty code might return small negative values,
for example because of roundoff error. This will confuse places like
gistchoose(). Prevent problems by clamping negative penalty values to
zero. (Just to be really sure, I also made it force NaNs to zero.)
Back-patch to all supported branches.
Alexander Korotkov1 parent 1d6dd87 commit ca76a39
2 files changed
+13
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
| 150 | + | |
| 151 | + | |
150 | 152 | | |
151 | 153 | | |
152 | 154 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | 19 | | |
18 | 20 | | |
| |||
530 | 532 | | |
531 | 533 | | |
532 | 534 | | |
533 | | - | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
534 | 538 | | |
535 | 539 | | |
536 | 540 | | |
537 | 541 | | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
538 | 546 | | |
539 | 547 | | |
540 | 548 | | |
541 | | - | |
542 | | - | |
| 549 | + | |
| 550 | + | |
543 | 551 | | |
544 | 552 | | |
545 | 553 | | |
| |||
0 commit comments