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

_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to