1
0
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:
Anatol Belski
2015-03-06 09:28:34 +01:00
parent 1a7798c786
commit 0d410fc2d2
3 changed files with 8 additions and 12 deletions
+2 -1
View File
@@ -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);
+1 -1
View File
@@ -107,7 +107,7 @@ static const struct cv {
},
{ { 0, 0 },
NULL,
}
},
};
private const char *
+5 -10
View File
@@ -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: