From f4a44f18b8fe5d23a11d12b048d4effce283379f Mon Sep 17 00:00:00 2001 From: Anatoliy Belsky Date: Tue, 5 Jun 2012 22:11:07 +0200 Subject: rechecked the merged libzip, took also the indents from the original to avoid confusion next time --- ext/zip/lib/zip_open.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ext/zip/lib/zip_open.c') diff --git a/ext/zip/lib/zip_open.c b/ext/zip/lib/zip_open.c index 11c6fe05a6..5aba34f67a 100644 --- a/ext/zip/lib/zip_open.c +++ b/ext/zip/lib/zip_open.c @@ -357,17 +357,17 @@ _zip_check_torrentzip(struct zip *za) if (za->cdir->comment_len != TORRENT_SIG_LEN+8 || strncmp(za->cdir->comment, TORRENT_SIG, TORRENT_SIG_LEN) != 0) return; - + memcpy(buf, za->cdir->comment+TORRENT_SIG_LEN, 8); buf[8] = '\0'; errno = 0; crc_should = strtoul(buf, &end, 16); if ((crc_should == UINT_MAX && errno != 0) || (end && *end)) return; - + if (_zip_filerange_crc(za->zp, za->cdir->offset, za->cdir->size, &crc_got, NULL) < 0) - return; + return; if (crc_got == crc_should) za->flags |= ZIP_AFL_TORRENT; -- cgit v1.2.1