forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7fb8801
committed
Clear errno before calling strtol() in spell.c.
Per POSIX, a caller of strtol() that wishes to check for errors mustset errno to 0 beforehand. Several places in spell.c neglected that,so that they risked delivering a false overflow error in case errnohad been ERANGE already. Given the lack of field reports, this casemay be unreachable at present --- but it's surely trouble waiting tohappen, so fix it.Author: Jacob Brazeal <jacob.brazeal@gmail.com>Discussion:https://postgr.es/m/CA+COZaBhsq6EromFm+knMJfzK6nTpG23zJ+K2=nfUQQXcj_xcQ@mail.gmail.comBackpatch-through: 131 parent67fc4c9 commit7fb8801
1 file changed
+4
-0
lines changedLines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
375 | 375 |
| |
376 | 376 |
| |
377 | 377 |
| |
| 378 | + | |
378 | 379 |
| |
379 | 380 |
| |
380 | 381 |
| |
| |||
1037 | 1038 |
| |
1038 | 1039 |
| |
1039 | 1040 |
| |
| 1041 | + | |
1040 | 1042 |
| |
1041 | 1043 |
| |
1042 | 1044 |
| |
| |||
1164 | 1166 |
| |
1165 | 1167 |
| |
1166 | 1168 |
| |
| 1169 | + | |
1167 | 1170 |
| |
1168 | 1171 |
| |
1169 | 1172 |
| |
| |||
1740 | 1743 |
| |
1741 | 1744 |
| |
1742 | 1745 |
| |
| 1746 | + | |
1743 | 1747 |
| |
1744 | 1748 |
| |
1745 | 1749 |
| |
|
0 commit comments
Comments
(0)