diff options
author | Helge Deller <deller@gmx.de> | 2013-07-03 20:25:30 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2013-07-03 20:25:30 +0200 |
commit | 13e5e74c0c85aeaf89b92ca0559a832841d27f94 (patch) | |
tree | edf2e6e64bc8bb1400377e6dedd1f4b2ad3f6fd4 | |
parent | 37dede1b6c5caf5023f524c2382d1caa5e523524 (diff) | |
download | palo-13e5e74c0c85aeaf89b92ca0559a832841d27f94.tar.gz |
Check against overflow of internal buffer.
Drop unnecessary and confusing debug info.
-rw-r--r-- | lib/gzip.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -192,9 +192,14 @@ int prepare_GZIP_loadable(int fd, struct loadable *loadable, int *wide) mark(&keep_unzipped); outptrlim = outptr + MAX_GZ_LEN; - printf("uncompressing %s to 0x%p", orig_filename, outptr); + if (0) + printf("uncompressing %s to 0x%p", orig_filename, outptr); + else + printf("uncompressing Linux kernel"); bytes_len = decompress(outptr, outptrlim); + if (bytes_len > MAX_GZ_LEN) + printf("\nERROR: Internal buffer MAX_GZ_LEN too small!"); if (bytes_len < 0) { release(release_all_mallocs); return PREPARE_CONTINUE; |