mirror of
https://github.com/gnustep/libs-base.git
synced 2025-06-02 09:31:07 +00:00
fix for bug #42483
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37934 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
94320d3388
commit
9e17f30f8b
4 changed files with 22 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2014-06-01 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/Additions/Unicode.m: Fix buffer overrun.
|
||||||
|
* Source/GSString.m: Fix uninitialised variable.
|
||||||
|
Cure for bug #42483
|
||||||
|
|
||||||
2014-05-28 Manuel Guesdon <mguesdon@orange-concept.com>
|
2014-05-28 Manuel Guesdon <mguesdon@orange-concept.com>
|
||||||
* Source/NSUndoManager.m
|
* Source/NSUndoManager.m
|
||||||
Assert sig is not null in registerUndoWithTarget:selector:object:
|
Assert sig is not null in registerUndoWithTarget:selector:object:
|
||||||
|
|
|
@ -2068,9 +2068,9 @@ bases:
|
||||||
uint8_t *tmp;
|
uint8_t *tmp;
|
||||||
|
|
||||||
#if GS_WITH_GC
|
#if GS_WITH_GC
|
||||||
tmp = NSAllocateCollectable(slen, 0);
|
tmp = NSAllocateCollectable(slen + extra, 0);
|
||||||
#else
|
#else
|
||||||
tmp = NSZoneMalloc(zone, slen);
|
tmp = NSZoneMalloc(zone, slen + extra);
|
||||||
if (ptr != buf && ptr != *dst)
|
if (ptr != buf && ptr != *dst)
|
||||||
{
|
{
|
||||||
NSZoneFree(zone, ptr);
|
NSZoneFree(zone, ptr);
|
||||||
|
|
|
@ -1806,7 +1806,7 @@ compare_u(GSStr self, NSString *aString, unsigned mask, NSRange aRange)
|
||||||
static inline const char*
|
static inline const char*
|
||||||
cString_c(GSStr self, NSStringEncoding enc)
|
cString_c(GSStr self, NSStringEncoding enc)
|
||||||
{
|
{
|
||||||
unsigned char *r;
|
unsigned char *r = 0;
|
||||||
|
|
||||||
if (self->_count == 0)
|
if (self->_count == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -256,7 +256,19 @@ int main()
|
||||||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||||
NSString *str;
|
NSString *str;
|
||||||
NSString *sub;
|
NSString *sub;
|
||||||
char buf[10];
|
const char *ptr;
|
||||||
|
char buf[10];
|
||||||
|
|
||||||
|
str = @"a";
|
||||||
|
while ([str length] < 30000)
|
||||||
|
{
|
||||||
|
str = [str stringByAppendingString: str];
|
||||||
|
}
|
||||||
|
if (0 == [str length] % 2)
|
||||||
|
{
|
||||||
|
str = [str stringByAppendingString: @"x"];
|
||||||
|
}
|
||||||
|
ptr = [str cStringUsingEncoding: NSASCIIStringEncoding];
|
||||||
|
|
||||||
PASS_EXCEPTION([NSString stringWithUTF8String: 0],
|
PASS_EXCEPTION([NSString stringWithUTF8String: 0],
|
||||||
NSInvalidArgumentException,
|
NSInvalidArgumentException,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue