kukugt / mupen64plus

Automatically exported from code.google.com/p/mupen64plus
0 stars 0 forks source link

Detecting CRC errors in .zip archives #163

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
In main/rom.c, load_archive_rom() the .zip files are decompressed and 
opened.

The following function calls all return a status (which is not handled):
- unzGoToFirstFile(zipromfile);
- unzGetCurrentFileInfo(zipromfile, &fileinfo, szFileName, 255, szExtraField, 
255, szComment, 255);
- unzOpenCurrentFile(zipromfile);
- unzReadCurrentFile(zipromfile, localrom, *loadlength);
- unzCloseCurrentFile(zipromfile);

If the return value of any of these calls is < 0, my suggestion is that 
they are not added to the romdb. I know for sure that the unzReadCurrentFile 
return < 0 for one of my .zip archives with CRC error.

Original issue reported on code.google.com by olejl77@gmail.com on 12 Oct 2008 at 5:58

GoogleCodeExporter commented 8 years ago
Should be fixed in r1110.

Original comment by sknau...@wesleyan.edu on 12 Oct 2008 at 7:54

GoogleCodeExporter commented 8 years ago
Fix verified OK.

Original comment by olejl77@gmail.com on 12 Oct 2008 at 5:37

GoogleCodeExporter commented 8 years ago

Original comment by sknau...@wesleyan.edu on 12 Oct 2008 at 6:06