-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ERROR: AddressSanitizer: global-buffer-overflow in function ErrorIDToName #923
Comments
Looks like a false positive. XML_ERROR_COUNT is a placeholder used as a constant size and not an actual XMLError. |
Is it positive If the TIXMLASSERT does not work on line 95 (commit 1dee28e - version 9.0.0)? Lines 82 to 97 in 1dee28e
This line has been fixed with current commit Line 95 in e45d9d1
|
Instrument Futag found this error with tinyxml2 version 9.0.0 and in current version.
tinyxml2/tinyxml2.cpp
Lines 2501 to 2507 in e45d9d1
errorID is a variable of XMLError type, which can receive value from XML_SUCCESS (0) to XML_ERROR_COUNT (19)
tinyxml2/tinyxml2.h
Lines 523 to 545 in e45d9d1
The _errorNames array has 19 elements (from 0 to 18) and was defined here:
tinyxml2/tinyxml2.cpp
Lines 2136 to 2156 in e45d9d1
So, when errorID gets XML_ERROR_COUNT value, error occurs at instruction
const char* errorName = _errorNames[errorID];
The generated fuzzing wrapper is attached below.
ErrorIDToName1.cpp.zip
The text was updated successfully, but these errors were encountered: