Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 610ccab1 authored by Koushik Dutta's avatar Koushik Dutta Committed by Ricardo Cerqueira
Browse files

unpackbootimg: Fix up the padding search in case the magic does not fall on a 8 byte boundary.

Change-Id: I57471f9c2117cd7965b6958ea0aa88e356436da6
parent 898dd021
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -85,6 +85,7 @@ int main(int argc, char** argv)
        fread(tmp, BOOT_MAGIC_SIZE, 1, f);
        if (memcmp(tmp, BOOT_MAGIC, BOOT_MAGIC_SIZE) == 0)
            break;
        fseek(f, i, SEEK_SET);
    }
    total_read = i;
    fread(tmp, BOOT_MAGIC_SIZE, 1, f);