==49255==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x62900000e200 at pc 0x0000004f9cf2 bp 0x7ffc36cc0350 sp 0x7ffc36cc0348 WRITE of size 4 at 0x62900000e200 thread T0 #0 0x4f9cf1 in od_decode_haar_dc_sb src/decode.c:644:32 #1 0x4f9cf1 in od_decode_coefficients src/decode.c:976 #2 0x4f9cf1 in daala_decode_packet_in src/decode.c:1204 #3 0x4ec2de in main examples/dump_video.c:426:13 #4 0x7f26a163d82f in __libc_start_main /build/glibc-GKVZIf/glibc-2.23/csu/../csu/libc-start.c:291 #5 0x418f98 in _start (dump_video+0x418f98) 0x62900000e200 is located 0 bytes to the right of 16384-byte region [0x62900000a200,0x62900000e200) allocated by thread T0 here: #0 0x4b90c8 in __interceptor_malloc (dump_video+0x4b90c8) #1 0x552d9f in od_state_init_impl src/state.c:409:36 #2 0x552d9f in od_state_init src/state.c:495 SUMMARY: AddressSanitizer: heap-buffer-overflow src/decode.c:644:32 in od_decode_haar_dc_sb Shadow bytes around the buggy address: 0x0c527fff9bf0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c527fff9c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c527fff9c10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c527fff9c20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x0c527fff9c30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 =>0x0c527fff9c40:[fa]fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c527fff9c50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c527fff9c60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c527fff9c70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c527fff9c80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa 0x0c527fff9c90: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa Shadow byte legend (one shadow byte represents 8 application bytes): Addressable: 00 Partially addressable: 01 02 03 04 05 06 07 Heap left redzone: fa Heap right redzone: fb Freed heap region: fd Stack left redzone: f1 Stack mid redzone: f2 Stack right redzone: f3 Stack partial redzone: f4 Stack after return: f5 Stack use after scope: f8 Global redzone: f9 Global init order: f6 Poisoned by user: f7 Container overflow: fc Array cookie: ac Intra object redzone: bb ASan internal: fe Left alloca redzone: ca Right alloca redzone: cb ==49255==ABORTING