mirror of
https://github.com/mauiaaron/apple2.git
synced 2025-02-04 14:34:59 +00:00
Silence Valgrind complaint about gzread()
This commit is contained in:
parent
adb09dc84e
commit
3f38467c93
@ -29,6 +29,7 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
|
#warning do newer androids dream of gzbuffer() ?
|
||||||
// Ugh, why is gzbuffer() symbol not part of zlib.h on Android? I guess maybe we should just go with the published
|
// Ugh, why is gzbuffer() symbol not part of zlib.h on Android? I guess maybe we should just go with the published
|
||||||
// default buffer size? Yay, GJ Goog!
|
// default buffer size? Yay, GJ Goog!
|
||||||
#define CHUNK 8192
|
#define CHUNK 8192
|
||||||
@ -190,7 +191,7 @@ const char *inf(const char* const src, int *rawcount)
|
|||||||
|
|
||||||
// inflate ...
|
// inflate ...
|
||||||
do {
|
do {
|
||||||
int buflen = gzread(gzsource, buf, CHUNK);
|
int buflen = gzread(gzsource, buf, CHUNK-1); // hmmm ... valgrind complains of a buffer read overflow in zlib inffast()?
|
||||||
if (buflen < 0) {
|
if (buflen < 0) {
|
||||||
ERRLOG("OOPS, gzip read ...");
|
ERRLOG("OOPS, gzip read ...");
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user