Commit e9627cf
Fix multiple data corruption in OD load
If the current OD had an object with a larger data size than when the
objects were stored, only the smaller part of the uint64_t would be read
into, but the actual setting of the object would use the entire, partly
uninitialized, value.
Also, in the pointer case the size was not checked against the actual size
of the target object, which would cause memory corruption if the object had
been shrunk since the values were stored.
Signed-off-by: Andreas Fritiofson <andreas.fritiofson@unjo.com>
Change-Id: I1e0fc0b0d6da4594ca8bcb61e01ab6ab5f42a5511 parent 5ab1a5e commit e9627cf
1 file changed
+17
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
377 | | - | |
| 377 | + | |
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
| |||
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
401 | | - | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
402 | 409 | | |
403 | 410 | | |
404 | 411 | | |
| |||
410 | 417 | | |
411 | 418 | | |
412 | 419 | | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
413 | 428 | | |
414 | 429 | | |
415 | | - | |
416 | | - | |
417 | 430 | | |
418 | 431 | | |
419 | 432 | | |
| |||
0 commit comments