• M
    net: fix misaligned member access · 4f51e1d3
    Marc-André Lureau 提交于
    Fixes the following ASAN warnings:
    
    /home/elmarco/src/qemu/hw/net/net_tx_pkt.c:201:27: runtime error: member access within misaligned address 0x631000028846 for type 'struct ip_header', which requires 4 byte alignment
    0x631000028846: note: pointer points here
     01 00 00 00 45 00  01 a9 01 00 00 00 40 11  78 45 00 00 00 00 ff ff  ff ff 00 00 00 00 00 00  00 00
                 ^
    /home/elmarco/src/qemu/hw/net/net_tx_pkt.c:208:63: runtime error: member access within misaligned address 0x631000028846 for type 'struct ip_header', which requires 4 byte alignment
    0x631000028846: note: pointer points here
     01 00 00 00 45 00  01 a9 01 00 00 00 40 11  78 45 00 00 00 00 ff ff  ff ff 00 00 00 00 00 00  00 00
                 ^
    /home/elmarco/src/qemu/hw/net/net_tx_pkt.c:210:13: runtime error: member access within misaligned address 0x631000028846 for type 'struct ip_header', which requires 4 byte alignment
    0x631000028846: note: pointer points here
     01 00 00 00 45 00  01 a9 01 00 00 00 40 11  78 45 00 00 00 00 ff ff  ff ff 00 00 00 00 00 00  00 00
    Signed-off-by: NMarc-André Lureau <marcandre.lureau@redhat.com>
    Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
    Message-id: 20180209190340.19516-1-marcandre.lureau@redhat.com
    Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
    4f51e1d3
net_tx_pkt.c 17.2 KB