Commit b1e49af
committed
mi: verify length of data before reading header
The total length could be shorter than then the header. Thus check
first the message length.
Running test mi_aem_ep_based_failure_conditions...==3181== Conditional jump or move depends on uninitialised value(s)
==3181== at 0x486E7D7: validate_enabled_list (mi.c:1445)
==3181== by 0x486E7D7: nvme_mi_aem_get_enabled (mi.c:1730)
==3181== by 0x486E8F3: aem_disable_enabled (mi.c:1605)
==3181== by 0x486EB3A: nvme_mi_aem_enable (mi.c:1667)
==3181== by 0x401621: test_mi_aem_ep_based_failure_helper (mi-mctp.c:1187)
==3181== by 0x401688: test_mi_aem_ep_based_failure_conditions (mi-mctp.c:1204)
==3181== by 0x400FF2: run_test (mi-mctp.c:1448)
==3181== by 0x400FF2: main (mi-mctp.c:1472)
Signed-off-by: Daniel Wagner <[email protected]>1 parent f3ef0fe commit b1e49af
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1440 | 1440 | | |
1441 | 1441 | | |
1442 | 1442 | | |
| 1443 | + | |
| 1444 | + | |
1443 | 1445 | | |
1444 | 1446 | | |
1445 | 1447 | | |
| |||
0 commit comments