--- ZynAddSubFX-2.4.0-orig/src/Misc/XMLwrapper.cpp 2010-02-10 18:36:01.000000000 -0500 +++ ZynAddSubFX-2.4.0/src/Misc/XMLwrapper.cpp 2010-02-10 19:51:09.000000000 -0500 @@ -307,14 +307,16 @@ char *XMLwrapper::doloadfile(const strin int filesize=-1; //try get filesize as gzip data (first) + char buf[1024*512]; gzFile gzfile=gzopen(filename.c_str(),"rb"); if (gzfile!=NULL) {//this is a gzip file // first check it's size while (!gzeof(gzfile)) { - gzseek (gzfile,1024*1024,SEEK_CUR); - if (gztell(gzfile)>10000000) { + //--- Replaced gzseek by gzread to circumvent a problem introduced + //--- in the devel version of zlib (1.2.3.7) + if (gzread(gzfile, buf, 1024*512) == 0) { gzclose(gzfile); - goto notgzip;//the file is too big + goto notgzip; // failed to read from the file }; }; filesize=gztell(gzfile);