Menu

#1 Memory allocation error

open
nobody
None
5
2002-05-09
2002-05-09
No

The gstring::create() method only allocates enough
space for the string body, and not the terminating
zero. As a result, the heap gets corrupted.

Similarly, the gstring::append() method should also
account for the terminating zero when it reallocates
space for a bigger string.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.