forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit99c01aa
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 parentc3510cf commit99c01aa
1 file changed
+4
-0
lines changedLines changed: 4 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
374 | 374 |
| |
375 | 375 |
| |
376 | 376 |
| |
| 377 | + | |
377 | 378 |
| |
378 | 379 |
| |
379 | 380 |
| |
| |||
1036 | 1037 |
| |
1037 | 1038 |
| |
1038 | 1039 |
| |
| 1040 | + | |
1039 | 1041 |
| |
1040 | 1042 |
| |
1041 | 1043 |
| |
| |||
1163 | 1165 |
| |
1164 | 1166 |
| |
1165 | 1167 |
| |
| 1168 | + | |
1166 | 1169 |
| |
1167 | 1170 |
| |
1168 | 1171 |
| |
| |||
1735 | 1738 |
| |
1736 | 1739 |
| |
1737 | 1740 |
| |
| 1741 | + | |
1738 | 1742 |
| |
1739 | 1743 |
| |
1740 | 1744 |
| |
|
0 commit comments
Comments
(0)