Skip navigation.
 
mlRe: Strange malloc/free issue inside a category
FROM : Jakob Olesen
DATE : Sun Jul 30 20:06:49 2006

On 30/07/2006, at 19.38, Ken Tozier wrote:

> - (NSString *) unicharHexStringFromData
> {
>     int                    slen    = [self length],
>                         dLen    = slen * sizeof(unichar);
>     unichar                *dbuf    = (unichar *) malloc (dLen), /


How many characters do you need to represent slen bytes as hex?
How many are you allocating?

Related mailsAuthorDate
mlStrange malloc/free issue inside a category Ken Tozier Jul 30, 19:38
mlRe: Strange malloc/free issue inside a category Andy Lee Jul 30, 19:57
mlRe: Strange malloc/free issue inside a category Jakob Olesen Jul 30, 20:06
mlRe: Strange malloc/free issue inside a category Ken Tozier Jul 30, 20:09
mlRe: Strange malloc/free issue inside a category Shawn Erickson Jul 30, 20:25
mlRe: Strange malloc/free issue inside a category Agent M Jul 31, 03:01
mlRe: Strange malloc/free issue inside a category Ken Tozier Jul 31, 04:36