forked from DaveGamble/cJSON
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit 60ff122
authored
add NULL checkings (DaveGamble#809)
* add NULL checks in cJSON_SetValuestring
Fixes DaveGamble#803(CVE-2023-50472)
* add NULL check in cJSON_InsertItemInArray
Fixes DaveGamble#802(CVE-2023-50471)
* add tests for NULL checks
add tests for NULL checks in cJSON_InsertItemInArray and cJSON_SetValuestring1 parent cb8693b commit 60ff122
2 files changed
+33
-2
lines changedLines changed: 12 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
401 | 401 |
| |
402 | 402 |
| |
403 | 403 |
| |
404 | - | ||
404 | + | ||
405 | + | ||
406 | + | ||
407 | + | ||
408 | + | ||
409 | + | ||
405 | 410 |
| |
406 | 411 |
| |
407 | 412 |
| |
| |||
2264 | 2269 |
| |
2265 | 2270 |
| |
2266 | 2271 |
| |
2267 | - | ||
2272 | + | ||
2268 | 2273 |
| |
2269 | 2274 |
| |
2270 | 2275 |
| |
| |||
2275 | 2280 |
| |
2276 | 2281 |
| |
2277 | 2282 |
| |
2283 | + | ||
2284 | + | ||
2285 | + | ||
2286 | + | ||
2287 | + | ||
2278 | 2288 |
| |
2279 | 2289 |
| |
2280 | 2290 |
| |
|
Lines changed: 21 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
352 | 352 |
| |
353 | 353 |
| |
354 | 354 |
| |
355 | + | ||
356 | + | ||
357 | + | ||
358 | + | ||
359 | + | ||
360 | + | ||
361 | + | ||
362 | + | ||
363 | + | ||
364 | + | ||
365 | + | ||
366 | + | ||
367 | + | ||
355 | 368 |
| |
356 | 369 |
| |
357 | 370 |
| |
| |||
411 | 424 |
| |
412 | 425 |
| |
413 | 426 |
| |
427 | + | ||
428 | + | ||
414 | 429 |
| |
415 | 430 |
| |
416 | 431 |
| |
| |||
427 | 442 |
| |
428 | 443 |
| |
429 | 444 |
| |
445 | + | ||
446 | + | ||
430 | 447 |
| |
431 | 448 |
| |
432 | 449 |
| |
433 | 450 |
| |
451 | + | ||
452 | + | ||
453 | + | ||
454 | + | ||
434 | 455 |
| |
435 | 456 |
| |
436 | 457 |
| |
|
0 commit comments