mirror of
https://github.com/leethomason/tinyxml2.git
synced 2026-07-25 13:13:00 +04:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1fadaae0c9 | |||
| 4cbb25155c |
@@ -545,6 +545,11 @@ const char* XMLUtil::GetCharacterRef(const char* p, char* value, int* length)
|
||||
}
|
||||
// convert the UCS to UTF-8
|
||||
ConvertUTF32ToUTF8(ucs, value, length);
|
||||
if (length == 0) {
|
||||
// If length is 0, there was an error. (Security? Bad input?)
|
||||
// Fail safely.
|
||||
return 0;
|
||||
}
|
||||
return p + delta + 1;
|
||||
}
|
||||
return p + 1;
|
||||
|
||||
Reference in New Issue
Block a user