mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-22 07:57:39 +00:00
No trailing zeros if the signed boot img is larger
This commit is contained in:
parent
0a2a590ab7
commit
0243610c09
@ -876,8 +876,10 @@ int sign(const char *image, const char *name, const char *cert, const char *key)
|
||||
close(fd);
|
||||
return 1;
|
||||
}
|
||||
if (auto off = lseek(fd, 0, SEEK_CUR); off < boot.map.sz()) {
|
||||
// Wipe out rest of tail
|
||||
write_zero(fd, boot.map.sz() - lseek(fd, 0, SEEK_CUR));
|
||||
write_zero(fd, boot.map.sz() - off);
|
||||
}
|
||||
close(fd);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user