two additional savety checks
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19981 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -101,6 +101,16 @@ main(int argc, char *argv[])
|
|||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (headersize % 512) {
|
||||||
|
fprintf(stderr, "Error: header size must be a multiple of 512 bytes\n");
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (imagesize % 512) {
|
||||||
|
fprintf(stderr, "Error: image size must be a multiple of 512 bytes\n");
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
// arbitrary 1 GB limitation
|
// arbitrary 1 GB limitation
|
||||||
if (headersize > 0x40000000u) {
|
if (headersize > 0x40000000u) {
|
||||||
fprintf(stderr, "Error: header size too large\n");
|
fprintf(stderr, "Error: header size too large\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user