]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
skipcpio: fixed signatured check 036
authorHarald Hoyer <harald@redhat.com>
Wed, 29 Jan 2014 07:35:47 +0000 (08:35 +0100)
committerHarald Hoyer <harald@redhat.com>
Wed, 29 Jan 2014 07:35:47 +0000 (08:35 +0100)
skipcpio/skipcpio.c

index c9120617ab1adf3e61bb9cdad25c8d961e2bede4..ac0578ea54be01ab2a9b150d77bbde46b9151520 100644 (file)
@@ -64,7 +64,7 @@ int main(int argc, char **argv)
 
         /* check, if this is a cpio archive */
         if ((buf[0] == 0x71 && buf[1] == 0xc7)
-            || (buf[0] == '0' && buf[1] == '7' && buf[0] == '0' && buf[1] == '7' && buf[0] == '0' && buf[1] == '1')) {
+            || (buf[0] == '0' && buf[1] == '7' && buf[2] == '0' && buf[3] == '7' && buf[4] == '0' && buf[5] == '1')) {
 
                 /* Search for CPIO_END */
                 do {