-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Issue description
=================================================================
==15869==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x61d000044a7e at pc 0x7fd38310ae1d bp 0x7ffe25c5d140 sp 0x7ffe25c5c8e8
READ of size 1985 at 0x61d000044a7e thread T0
#0 0x7fd38310ae1c (/usr/lib/libasan.so.5+0x66e1c)
#1 0x561e216f2c48 in my_strndup (/home/chris/development/raylib/hexRPG/hexRPG+0x5dc48)
#2 0x561e216f1eb2 in tinyobj_parse_obj (/home/chris/development/raylib/hexRPG/hexRPG+0x5ceb2)
#3 0x561e216fb36f in LoadOBJ (/home/chris/development/raylib/hexRPG/hexRPG+0x6636f)
#4 0x561e216fb063 in LoadModel (/home/chris/development/raylib/hexRPG/hexRPG+0x66063)
#5 0x561e216a12df in main src/main.c:164
#6 0x7fd382c5bdea in __libc_start_main ../csu/libc-start.c:308
#7 0x561e2169df19 in _start (/home/chris/development/raylib/hexRPG/hexRPG+0x8f19)
0x61d000044a7e is located 0 bytes to the right of 2046-byte region [0x61d000044280,0x61d000044a7e)
allocated by thread T0 here:
#0 0x7fd3831b0458 in __interceptor_malloc (/usr/lib/libasan.so.5+0x10c458)
#1 0x561e216fb322 in LoadOBJ (/home/chris/development/raylib/hexRPG/hexRPG+0x66322)
SUMMARY: AddressSanitizer: heap-buffer-overflow (/usr/lib/libasan.so.5+0x66e1c)
Shadow bytes around the buggy address:
0x0c3a800008f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c3a80000900: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c3a80000910: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c3a80000920: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
0x0c3a80000930: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x0c3a80000940: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00[06]
0x0c3a80000950: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c3a80000960: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c3a80000970: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c3a80000980: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c3a80000990: 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
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
Shadow gap: cc
==15869==ABORTING
Environment
linux 64 bit, statically linking to raylib, running address sanitize (was wanting to check my code not yours :p )
Code Example
any / first occurrence of LoadModel
I note that this issue has been reported / fixed before ?