mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 21:35:39 +00:00
Fix for memory allocation off by 1 error. No bug. r: rhp (submitted by Ben Bucksch <mozilla-news@bucksch.org>
This commit is contained in:
parent
28e7445770
commit
a554253a94
@ -174,7 +174,7 @@ NS_COM PRInt32 nsUnescapeCount(char * str)
|
||||
NS_COM char *
|
||||
nsEscapeHTML(const char * string)
|
||||
{
|
||||
char *rv = (char *) nsAllocator::Alloc(nsCRT::strlen(string)*4 + 1); /* The +1 is for the trailing null! */
|
||||
char *rv = (char *) nsAllocator::Alloc(nsCRT::strlen(string)*5 + 1); /* The +1 is for the trailing null! */
|
||||
char *ptr = rv;
|
||||
|
||||
if(rv)
|
||||
|
Loading…
Reference in New Issue
Block a user