Henning Meier-Geinitz wrote: > str = malloc (16 + 1); > memset (str, 0, sizeof (str)); malloc+memset => calloc But: str[16]=0; should be enough. No need to zero-out memory you're going to overwrite immediatly.
> The memset won't work because sizeof (str) is always 4 (on 32 bit > platforms). And if ibug doesn't contain any zeros --> bang. Exactly. And it shouldn't contain it, IIUC. Shouldn't it be space-padded to 16 chars? Tks, Diego.
