Commit c06f126
committed
mctp-netlink: Don't memcpy() when source list is NULL
Mitigate the ubsan splat:
Feb 27 09:30:55 test mctpd[984]: SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior ../../../../../../workspace/sources/mctp/src/mctp-netlink.c:1102:2 in
Feb 27 09:31:00 test mctpd[993]: ../../../../../../workspace/sources/mctp/src/mctp-netlink.c:1102:2: runtime error: null pointer passed as argument 2, which is declared to never be null
Feb 27 09:31:00 test mctpd[993]: #0 0x47fcc0 (/usr/sbin/mctpd+0x57cc0) (BuildId: 74658a0b3317f1295bab6bbcd8febf809768bfda)
Feb 27 09:31:00 test mctpd[993]: #1 0x459590 (/usr/sbin/mctpd+0x31590) (BuildId: 74658a0b3317f1295bab6bbcd8febf809768bfda)
Feb 27 09:31:00 test mctpd[993]: #2 0x4498f0 (/usr/sbin/mctpd+0x218f0) (BuildId: 74658a0b3317f1295bab6bbcd8febf809768bfda)
Feb 27 09:31:00 test mctpd[993]: #3 0xa62904ac (/usr/lib/libc.so.6+0x1f4ac) (BuildId: f7dfc12cfaed3ca290b3c7f41ef9145c0de0fe6b)
Feb 27 09:31:00 test mctpd[993]: #4 0xa6290598 in __libc_start_main (/usr/lib/libc.so.6+0x1f598) (BuildId: f7dfc12cfaed3ca290b3c7f41ef9145c0de0fe6b)
Signed-off-by: Andrew Jeffery <[email protected]>1 parent 7c28dad commit c06f126
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1094 | 1094 | | |
1095 | 1095 | | |
1096 | 1096 | | |
1097 | | - | |
| 1097 | + | |
1098 | 1098 | | |
1099 | 1099 | | |
1100 | 1100 | | |
1101 | 1101 | | |
| 1102 | + | |
1102 | 1103 | | |
1103 | 1104 | | |
1104 | 1105 | | |
| |||
0 commit comments