Skip to content

Commit 0c8454c

Browse files
committed
Partially reapply ba40f50
1 parent 57c23df commit 0c8454c

File tree

1 file changed

+2
-4
lines changed
  • ext/fileinfo/libmagic

1 file changed

+2
-4
lines changed

ext/fileinfo/libmagic/cdf.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -388,19 +388,17 @@ ssize_t
388388
cdf_read_sector(const cdf_info_t *info, void *buf, size_t offs, size_t len,
389389
const cdf_header_t *h, cdf_secid_t id)
390390
{
391-
size_t ss = CDF_SEC_SIZE(h);
392391
size_t pos = CDF_SEC_POS(h, id);
393-
assert(ss == len);
392+
assert(CDF_SEC_SIZE(h) == len);
394393
return cdf_read(info, CAST(zend_off_t, pos), RCAST(char *, buf) + offs, len);
395394
}
396395

397396
ssize_t
398397
cdf_read_short_sector(const cdf_stream_t *sst, void *buf, size_t offs,
399398
size_t len, const cdf_header_t *h, cdf_secid_t id)
400399
{
401-
size_t ss = CDF_SHORT_SEC_SIZE(h);
402400
size_t pos = CDF_SHORT_SEC_POS(h, id);
403-
assert(ss == len);
401+
assert(CDF_SHORT_SEC_SIZE(h) == len);
404402
if (pos + len > CDF_SEC_SIZE(h) * sst->sst_len) {
405403
DPRINTF(("Out of bounds read %" SIZE_T_FORMAT "u > %"
406404
SIZE_T_FORMAT "u\n",

0 commit comments

Comments
 (0)