lzma: strncpy for non-string data?
Ryan C. Gordon
icculus at icculus.org
Sun May 27 02:17:30 EDT 2007
Dennis,
This is in lzma.c, around line 316...
/* !!! FIXME: strncpy for non-string data? */
strncpy(outBuffer,
(void*) (entry->archive->folder[entry->folderIndex].cache +
entry->offset + entry->position),
(size_t) wantedSize);
...is there any reason this can't be a memcpy()? If I'm reading this
correctly, this will copy the wrong amount of data if it reads a binary
file with an embedded zero.
--ryan.
More information about the physfs
mailing list