Message ID | e3de8a44-7607-747d-848f-efed25e5965f@ekholm.se |
---|---|
State | Deferred |
Delegated to: | Tom Rini |
Headers | show |
diff --git a/tools/mkenvimage.c b/tools/mkenvimage.c index 8eee72e..45d0606 100644 --- a/tools/mkenvimage.c +++ b/tools/mkenvimage.c @@ -162,7 +162,7 @@ int main(int argc, char **argv) txt_fd = STDIN_FILENO; do { - filebuf = realloc(filebuf, readlen); + filebuf = realloc(filebuf, filesize + readlen); if (!filebuf) { fprintf(stderr, "Can't realloc memory for the input file buffer\n"); return EXIT_FAILURE;