Commit 5c47676
authored
Check for NULL object references in deserializer (#1327)
JS_ReadTypedArray contains a hack where it briefly puts a NULL object
pointer in the object reference table to work around a chicken-and-egg
problem.
Malicious or corrupt BJSON could reference that entry while it was
still NULL and trigger a segfault. Guard against that.
Fixes: #13211 parent f470b8f commit 5c47676
2 files changed
+10
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38649 | 38649 | | |
38650 | 38650 | | |
38651 | 38651 | | |
38652 | | - | |
| 38652 | + | |
38653 | 38653 | | |
38654 | 38654 | | |
38655 | 38655 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
268 | 268 | | |
269 | 269 | | |
270 | 270 | | |
271 | | - | |
| 271 | + | |
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
| 279 | + | |
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
292 | 293 | | |
293 | | - | |
| 294 | + | |
294 | 295 | | |
295 | 296 | | |
296 | | - | |
| 297 | + | |
297 | 298 | | |
298 | 299 | | |
299 | 300 | | |
| |||
0 commit comments