ObjFW  Check-in [1f4407ddf1]

Overview
Comment:OFZIPArchive: Fix ZIP64Index not being set

Interestingly, Clang did not warn about this, but GCC does.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 1f4407ddf1bb3bb5d062bb2318f5ba2a16f16e4ebc43279b42422e7181449592
User & Date: js on 2017-08-19 09:19:56
Other Links: manifest | tags
Context
2017-08-19
15:54
Fix a linker warning on OpenBSD/SPARC64 check-in: 7dde89363f user: js tags: trunk
09:19
OFZIPArchive: Fix ZIP64Index not being set check-in: 1f4407ddf1 user: js tags: trunk
08:24
Add -[OFMutableSet removeAllObjects] check-in: 8823a4df67 user: js tags: trunk
Changes

Modified src/OFZIPArchive.m from [85b7d55558] to [e300d0925e].

658
659
660
661
662
663
664
665
666
667
668
669
670
671
672

		_fileName = [[stream readStringWithLength: fileNameLength
						 encoding: encoding] copy];
		if (extraFieldLength > 0)
			extraField = [[[stream readDataWithCount:
			    extraFieldLength] mutableCopy] autorelease];

		of_zip_archive_entry_extra_field_find(extraField,
		    OF_ZIP_ARCHIVE_ENTRY_EXTRA_FIELD_ZIP64, &ZIP64Size);

		if (ZIP64Index != OF_NOT_FOUND) {
			const uint8_t *ZIP64 =
			    [extraField itemAtIndex: ZIP64Index];
			of_range_t range =
			    of_range(ZIP64Index - 4, ZIP64Size + 4);







|







658
659
660
661
662
663
664
665
666
667
668
669
670
671
672

		_fileName = [[stream readStringWithLength: fileNameLength
						 encoding: encoding] copy];
		if (extraFieldLength > 0)
			extraField = [[[stream readDataWithCount:
			    extraFieldLength] mutableCopy] autorelease];

		ZIP64Index = of_zip_archive_entry_extra_field_find(extraField,
		    OF_ZIP_ARCHIVE_ENTRY_EXTRA_FIELD_ZIP64, &ZIP64Size);

		if (ZIP64Index != OF_NOT_FOUND) {
			const uint8_t *ZIP64 =
			    [extraField itemAtIndex: ZIP64Index];
			of_range_t range =
			    of_range(ZIP64Index - 4, ZIP64Size + 4);