=================================================================
==12051==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x611000000780 at pc 0x7fb60f73a216 bp 0x7ffe1b08cd60 sp 0x7ffe1b08cd58
READ of size 1 at 0x611000000780 thread T0
#0 0x7fb60f73a215 in switch_b64_encode src/switch_utils.c:1024
#1 0x5615466c6d25 in signtoken test/../gcs.c:80
#2 0x5615466c15e5 in main test/test_gcs.c:75
#3 0x7fb60ed4909a in __libc_start_main ../csu/libc-start.c:308
#4 0x5615466c2c59 in _start (/drone/src/src/mod/applications/mod_http_cache/test/.libs/test_gcs+0xac59)
0x611000000780 is located 0 bytes to the right of 256-byte region [0x611000000680,0x611000000780)
allocated by thread T0 here:
#0 0x7fb6101b6330 in __interceptor_malloc (/usr/lib/x86_64-linux-gnu/libasan.so.5+0xe9330)
#1 0x5615466c6cbf in signtoken test/../gcs.c:78
#2 0x5615466c15e5 in main test/test_gcs.c:75
#3 0x7fb60ed4909a 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
==12051==ABORTING