mirror of
https://github.com/php/php-src.git
synced 2026-04-27 01:48:26 +02:00
more after patch fixes
This commit is contained in:
@@ -447,7 +447,8 @@ apprentice_1(struct magic_set *ms, const char *fn, int action)
|
||||
|
||||
if (action == FILE_LIST) {
|
||||
for (i = 0; i < MAGIC_SETS; i++) {
|
||||
printf("Set " SIZE_T_FORMAT ":\nBinary patterns:\n",i);
|
||||
printf("Set %" SIZE_T_FORMAT "u:\nBinary patterns:\n",
|
||||
i);
|
||||
apprentice_list(ms->mlist[i], BINTEST);
|
||||
printf("Text patterns:\n");
|
||||
apprentice_list(ms->mlist[i], TEXTTEST);
|
||||
|
||||
@@ -107,7 +107,7 @@ static const struct cv {
|
||||
},
|
||||
{ { 0, 0 },
|
||||
NULL,
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
private const char *
|
||||
|
||||
@@ -636,7 +636,7 @@ mprint(struct magic_set *ms, struct magic *m)
|
||||
}
|
||||
rval = file_printf(ms, F(ms, m, "%s"),
|
||||
file_printable(sbuf, sizeof(sbuf), cp));
|
||||
free(cp);
|
||||
efree(cp);
|
||||
|
||||
if (rval == -1)
|
||||
return -1;
|
||||
@@ -1089,13 +1089,8 @@ mcopy(struct magic_set *ms, union VALUETYPE *p, int type, int indir,
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (m->str_flags & REGEX_LINE_COUNT) {
|
||||
linecnt = m->str_range;
|
||||
bytecnt = linecnt * 80;
|
||||
} else {
|
||||
linecnt = 0;
|
||||
bytecnt = m->str_range;
|
||||
}
|
||||
linecnt = m->str_range;
|
||||
bytecnt = linecnt * 80;
|
||||
|
||||
if (bytecnt == 0 || bytecnt > nbytes - offset)
|
||||
bytecnt = nbytes - offset;
|
||||
@@ -1667,11 +1662,11 @@ mget(struct magic_set *ms, const unsigned char *s, struct magic *m,
|
||||
return -1;
|
||||
}
|
||||
if (file_printf(ms, "%s", rbuf) == -1) {
|
||||
if (rbuf) free(rbuf);
|
||||
if (rbuf) efree(rbuf);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if (rbuf) free(rbuf);
|
||||
if (rbuf) efree(rbuf);
|
||||
return rv;
|
||||
|
||||
case FILE_USE:
|
||||
|
||||
Reference in New Issue
Block a user