=================================================================
==11887==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x611000000780 at pc 0x7f838f4f1266 bp 0x7ffd0e81dee0 sp 0x7ffd0e81ded8
READ of size 1 at 0x611000000780 thread T0
#0 0x7f838f4f1265 in switch_b64_encode src/switch_utils.c:1024
#1 0x55770f770cf5 in signtoken test/../gcs.c:80
#2 0x55770f76b5d3 in main test/test_gcs.c:75
#3 0x7f838eb0009a in __libc_start_main ../csu/libc-start.c:308
#4 0x55770f76cc29 in _start (/drone/src/src/mod/applications/mod_http_cache/test/.libs/test_gcs+0xac29)
0x611000000780 is located 0 bytes to the right of 256-byte region [0x611000000680,0x611000000780)
allocated by thread T0 here:
#0 0x7f838ff6b330 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9330)
#1 0x55770f770c8f in signtoken test/../gcs.c:78
#2 0x55770f76b5d3 in main test/test_gcs.c:75
#3 0x7f838eb0009a in __libc_start_main ../csu/libc-start.c:308
SUMMARY: AddressSanitizer: heap-buffer-overflow src/switch_utils.c:1024 in switch_b64_encode
Shadow bytes around the buggy address:
0x0c227fff80a0: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
0x0c227fff80b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c227fff80c0: 00 00 00 00 00 00 00 00 fa fa fa fa fa fa fa fa
0x0c227fff80d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c227fff80e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c227fff80f0:[fa]fa fa fa fa fa fa fa fd fd fd fd fd fd fd fd
0x0c227fff8100: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c227fff8110: fd fd fd fd fd fd fd fd fa fa fa fa fa fa fa fa
0x0c227fff8120: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c227fff8130: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c227fff8140: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
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
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
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
==11887==ABORTING