gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ProjectCenter crash with unichar in parser


From: Riccardo Mottola
Subject: Re: ProjectCenter crash with unichar in parser
Date: Mon, 28 Nov 2016 12:54:22 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:43.0) Gecko/20100101 Firefox/43.0 SeaMonkey/2.40

Hi,

Richard Frith-Macdonald wrote:
Assuming the problem is the dereference of ch, it will crash if ch points to 
non-existent/inaccessible memory or (some architectures) if the memory location 
is not on the correct boundary for the data type.
In this case you printed the pointer and it clearly isn't null or on an odd 
boundary, so I guess it's a non-existent memory location.

I suppose that given this initialization malloc:
_length = [_string length];
 _uchar = malloc(sizeof(unichar)*_length);

then if my brain isn't too brittle, codeType(_uchar+_length) is equivalent of codeType(_uchar[_length]) an thus guaranteed to be an off-by-one memory access, right?

Riccardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]