forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitf47004a
committed
Tighten array dimensionality checks in Perl -> SQL array conversion.
plperl_array_to_datum() wasn't sufficiently careful about checkingthat nested lists represent a rectangular array structure; it wouldaccept inputs such as "[1, []]". This is a bit related to thePL/Python bug fixed in commit81eaaf6, but it doesn't seem toprovide any direct route to a memory stomp. Instead the likelyfailure mode is for makeMdArrayResult to be passed fewer Datums thanthe claimed array dimensionality requires, possibly leading to a wildpointer dereference and SIGSEGV.Per report from Alexander Lakhin. It's been broken for a longtime, so back-patch to all supported branches.Discussion:https://postgr.es/m/5ebae5e4-d401-fadf-8585-ac3eaf53219c@gmail.com1 parent81eaaf6 commitf47004a
File tree
3 files changed
+119
-23
lines changed- src/pl/plperl
- expected
- sql
3 files changed
+119
-23
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
215 | 215 |
| |
216 | 216 |
| |
217 | 217 |
| |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
218 | 261 |
| |
219 | 262 |
| |
220 | 263 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
272 | 272 |
| |
273 | 273 |
| |
274 | 274 |
| |
275 |
| - | |
| 275 | + | |
276 | 276 |
| |
277 |
| - | |
| 277 | + | |
278 | 278 |
| |
279 | 279 |
| |
280 | 280 |
| |
| |||
1160 | 1160 |
| |
1161 | 1161 |
| |
1162 | 1162 |
| |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
1163 | 1168 |
| |
1164 | 1169 |
| |
1165 |
| - | |
| 1170 | + | |
1166 | 1171 |
| |
1167 |
| - | |
| 1172 | + | |
1168 | 1173 |
| |
1169 | 1174 |
| |
1170 | 1175 |
| |
| |||
1184 | 1189 |
| |
1185 | 1190 |
| |
1186 | 1191 |
| |
1187 |
| - | |
1188 |
| - | |
1189 |
| - | |
1190 |
| - | |
1191 |
| - | |
1192 |
| - | |
1193 |
| - | |
1194 | 1192 |
| |
1195 | 1193 |
| |
1196 | 1194 |
| |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
1197 | 1207 |
| |
1198 | 1208 |
| |
1199 | 1209 |
| |
1200 |
| - | |
| 1210 | + | |
| 1211 | + | |
1201 | 1212 |
| |
1202 | 1213 |
| |
1203 | 1214 |
| |
1204 | 1215 |
| |
1205 | 1216 |
| |
1206 |
| - | |
| 1217 | + | |
1207 | 1218 |
| |
1208 |
| - | |
| 1219 | + | |
1209 | 1220 |
| |
1210 | 1221 |
| |
1211 | 1222 |
| |
| |||
1227 | 1238 |
| |
1228 | 1239 |
| |
1229 | 1240 |
| |
1230 |
| - | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
1231 | 1248 |
| |
1232 | 1249 |
| |
1233 | 1250 |
| |
| |||
1240 | 1257 |
| |
1241 | 1258 |
| |
1242 | 1259 |
| |
1243 |
| - | |
| 1260 | + | |
| 1261 | + | |
1244 | 1262 |
| |
1245 | 1263 |
| |
1246 | 1264 |
| |
| |||
1256 | 1274 |
| |
1257 | 1275 |
| |
1258 | 1276 |
| |
1259 |
| - | |
1260 |
| - | |
1261 | 1277 |
| |
1262 | 1278 |
| |
1263 | 1279 |
| |
1264 |
| - | |
| 1280 | + | |
1265 | 1281 |
| |
1266 |
| - | |
| 1282 | + | |
1267 | 1283 |
| |
1268 |
| - | |
| 1284 | + | |
1269 | 1285 |
| |
1270 | 1286 |
| |
1271 | 1287 |
| |
1272 |
| - | |
1273 |
| - | |
| 1288 | + | |
| 1289 | + | |
1274 | 1290 |
| |
1275 | 1291 |
| |
1276 | 1292 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
159 | 159 |
| |
160 | 160 |
| |
161 | 161 |
| |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
162 | 199 |
| |
163 | 200 |
| |
164 | 201 |
| |
|
0 commit comments
Comments
(0)