fix(skipcpio): edit skipcpio.c: strstr -> memmem

because CPIO_END might follow a NULL byte in buf
master
realtime-neil 2021-01-25 22:44:07 +00:00 committed by Jóhann B. Guðmundsson
parent bf1a2262ea
commit 68dd8af21d
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ int main(int argc, char **argv)
if (s <= 0)
break;

h = strstr(buf, CPIO_END);
h = memmem(buf, sizeof(buf), CPIO_END, sizeof(CPIO_END));
if (h) {
pos = (h - buf) + pos + CPIO_ENDLEN;
fseek(f, pos, SEEK_SET);