forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit7ccb6dc
committed
Prevent buffer overrun while parsing an integer in a "query_int" value.
contrib/intarray's gettoken() uses a fixed-size buffer to collect aninteger's digits, and did not guard against overrunning the buffer.This is at least a backend crash risk, and in principle might allowarbitrary code execution. The code didn't check for overflow of theinteger value either, which while not presenting a crash risk was stillbad.Thanks to Apple Inc's security team for reporting this issue and supplyingthe fix.Security:CVE-2010-40151 parent0ac8c8d commit7ccb6dc
1 file changed
+16
-10
lines changedLines changed: 16 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
56 | 56 |
| |
57 | 57 |
| |
58 | 58 |
| |
59 |
| - | |
60 |
| - | |
| 59 | + | |
| 60 | + | |
61 | 61 |
| |
62 | 62 |
| |
63 | 63 |
| |
64 |
| - | |
| 64 | + | |
65 | 65 |
| |
66 | 66 |
| |
| 67 | + | |
| 68 | + | |
67 | 69 |
| |
68 | 70 |
| |
69 | 71 |
| |
70 |
| - | |
| 72 | + | |
71 | 73 |
| |
72 | 74 |
| |
73 | 75 |
| |
74 | 76 |
| |
75 |
| - | |
76 |
| - | |
| 77 | + | |
77 | 78 |
| |
78 | 79 |
| |
79 | 80 |
| |
| |||
93 | 94 |
| |
94 | 95 |
| |
95 | 96 |
| |
96 |
| - | |
97 |
| - | |
| 97 | + | |
98 | 98 |
| |
99 | 99 |
| |
100 | 100 |
| |
101 |
| - | |
102 |
| - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
103 | 109 |
| |
104 | 110 |
| |
105 | 111 |
| |
|
0 commit comments
Comments
(0)