forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitd6d1456
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 parent67dbe72 commitd6d1456
1 file changed
+16
-10
lines changedLines changed: 16 additions & 10 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
62 | 62 |
| |
63 | 63 |
| |
64 | 64 |
| |
65 |
| - | |
66 |
| - | |
| 65 | + | |
| 66 | + | |
67 | 67 |
| |
68 | 68 |
| |
69 | 69 |
| |
70 |
| - | |
| 70 | + | |
71 | 71 |
| |
72 | 72 |
| |
| 73 | + | |
| 74 | + | |
73 | 75 |
| |
74 | 76 |
| |
75 | 77 |
| |
76 |
| - | |
| 78 | + | |
77 | 79 |
| |
78 | 80 |
| |
79 | 81 |
| |
80 | 82 |
| |
81 |
| - | |
82 |
| - | |
| 83 | + | |
83 | 84 |
| |
84 | 85 |
| |
85 | 86 |
| |
| |||
99 | 100 |
| |
100 | 101 |
| |
101 | 102 |
| |
102 |
| - | |
103 |
| - | |
| 103 | + | |
104 | 104 |
| |
105 | 105 |
| |
106 | 106 |
| |
107 |
| - | |
108 |
| - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
109 | 115 |
| |
110 | 116 |
| |
111 | 117 |
| |
|
0 commit comments
Comments
(0)