瀏覽代碼

Merged changeset 1084:ee3d2e6e1161 from stable-2.0: unitialized array fix.

Ryan C. Gordon 16 年之前
父節點
當前提交
a9855949f0
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/archiver_zip.c

+ 1 - 1
src/archiver_zip.c

@@ -373,7 +373,7 @@ static int ZIP_fileClose(fvoid *opaque)
 static PHYSFS_sint64 zip_find_end_of_central_dir(void *in, PHYSFS_sint64 *len)
 static PHYSFS_sint64 zip_find_end_of_central_dir(void *in, PHYSFS_sint64 *len)
 {
 {
     PHYSFS_uint8 buf[256];
     PHYSFS_uint8 buf[256];
-    PHYSFS_uint8 extra[4];
+    PHYSFS_uint8 extra[4] = { 0, 0, 0, 0 };
     PHYSFS_sint32 i = 0;
     PHYSFS_sint32 i = 0;
     PHYSFS_sint64 filelen;
     PHYSFS_sint64 filelen;
     PHYSFS_sint64 filepos;
     PHYSFS_sint64 filepos;