Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Enter the number of bits of first binary string
- 4
- Enter the first string
- 1111
- Enter the number of bits of the second string
- 5
- Enter the second string
- 00000
- =================================================================
- ==2226==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60200000ecb2 at pc 0x0000004bfe77 bp 0x7ffe547da2f0 sp 0x7ffe547da2e8
- WRITE of size 1 at 0x60200000ecb2 thread T0
- #0 0x4bfe76 in subtract /home/rob/Documents/reddit.c:95:5
- #1 0x4c2471 in multiply /home/rob/Documents/reddit.c:167:21
- #2 0x4c21b7 in multiply /home/rob/Documents/reddit.c:163:23
- #3 0x4c21b7 in multiply /home/rob/Documents/reddit.c:163:23
- #4 0x4c2c64 in main /home/rob/Documents/reddit.c:190:22
- #5 0x7f37fa78eb44 in __libc_start_main /build/glibc-uPj9cH/glibc-2.19/csu/libc-start.c:287
- #6 0x4bd01c in _start (/home/rob/Documents/a.out+0x4bd01c)
- 0x60200000ecb2 is located 0 bytes to the right of 2-byte region [0x60200000ecb0,0x60200000ecb2)
- allocated by thread T0 here:
- #0 0x49f99b in __interceptor_malloc (/home/rob/Documents/a.out+0x49f99b)
- #1 0x4bfa6b in subtract /home/rob/Documents/reddit.c:91:17
- #2 0x4c2471 in multiply /home/rob/Documents/reddit.c:167:21
- #3 0x4c21b7 in multiply /home/rob/Documents/reddit.c:163:23
- #4 0x4c21b7 in multiply /home/rob/Documents/reddit.c:163:23
- #5 0x4c2c64 in main /home/rob/Documents/reddit.c:190:22
- #6 0x7f37fa78eb44 in __libc_start_main /build/glibc-uPj9cH/glibc-2.19/csu/libc-start.c:287
- SUMMARY: AddressSanitizer: heap-buffer-overflow /home/rob/Documents/reddit.c:95 subtract
- Shadow bytes around the buggy address:
- 0x0c047fff9d40: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
- 0x0c047fff9d50: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
- 0x0c047fff9d60: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
- 0x0c047fff9d70: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
- 0x0c047fff9d80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
- =>0x0c047fff9d90: fa fa fa fa fa fa[02]fa fa fa 03 fa fa fa 03 fa
- 0x0c047fff9da0: fa fa 03 fa fa fa 02 fa fa fa 02 fa fa fa 02 fa
- 0x0c047fff9db0: fa fa 02 fa fa fa 02 fa fa fa 02 fa fa fa 02 fa
- 0x0c047fff9dc0: fa fa 02 fa fa fa 02 fa fa fa 02 fa fa fa 02 fa
- 0x0c047fff9dd0: fa fa 02 fa fa fa 02 fa fa fa 03 fa fa fa 02 fa
- 0x0c047fff9de0: fa fa 03 fa fa fa 03 fa fa fa 04 fa fa fa 03 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
- ASan internal: fe
- ==2226==ABORTING
Advertisement
Add Comment
Please, Sign In to add comment