1
0
Эх сурвалжийг харах

FIXME removal: Replaced a strncpy() with a memcpy().

Ryan C. Gordon 19 жил өмнө
parent
commit
d1d0ea025f
1 өөрчлөгдсөн 2 нэмэгдсэн , 3 устгасан
  1. 2 3
      archivers/lzma.c

+ 2 - 3
archivers/lzma.c

@@ -313,9 +313,8 @@ static PHYSFS_sint64 LZMA_read(fvoid *opaque, void *outBuffer,
     } /* if */
 
     /* Copy wanted bytes over from cache to outBuffer */
-/* !!! FIXME: strncpy for non-string data? */
-	strncpy(outBuffer,
-            (void*) (entry->archive->folder[entry->folderIndex].cache +
+	memcpy(outBuffer,
+            (entry->archive->folder[entry->folderIndex].cache +
                      entry->offset + entry->position),
             (size_t) wantedSize);
     entry->position += wantedSize;