diff --git a/tools/scramble.c b/tools/scramble.c index a5c8caea3e..716b73b569 100644 --- a/tools/scramble.c +++ b/tools/scramble.c @@ -50,6 +50,8 @@ int main (int argc, char** argv) } fseek(file,0,SEEK_END); length = ftell(file); + length = (length + 3) & ~3; /* Round up to nearest 4 byte boundary */ + fseek(file,0,SEEK_SET); inbuf = malloc(length); outbuf = malloc(length);