libobjc/9751: malloc of strlen, not strlen+1

Richard Frith-Macdonald
Mon May 12 09:14:00 GMT 2003

I was just looking at this ... and I don't think this is a bug.
If I understand the code correctly, it is removing a single byte (the 
garbage collecting invisibility marker) from the type string.  So the 
length of the new string is one byte less than that of the original.
So allocating strlen(ivar->ivar_type) bytes is correct.
It might perhaps be worth adding a comment to thiks effect in the source 

More information about the Gcc-bugs mailing list