mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 23:10:40 +00:00
ICU-4576 Fix buffer overrun in findWindowsZoneID: wasn't leaving room for trailing null when allocating buffer from heap.
X-SVN-Rev: 19027
This commit is contained in:
parent
913207b34a
commit
3d0b127c12
1 changed files with 1 additions and 1 deletions
|
@ -282,7 +282,7 @@ static const char *findWindowsZoneID(const UChar *icuid, int32_t length)
|
|||
* trailing null.
|
||||
*/
|
||||
if (length >= ICUID_STACK_BUFFER_SIZE) {
|
||||
buffer = NEW_ARRAY(char, length);
|
||||
buffer = NEW_ARRAY(char, length + 1);
|
||||
}
|
||||
|
||||
u_UCharsToChars(icuid, buffer, length);
|
||||
|
|
Loading…
Add table
Reference in a new issue