--- stackless/Modules/zlibmodule.c 2010-12-08 21:40:48.000000000 0000 +++ stackless\Modules\zlibmodule.c 2010-12-08 21:40:48.000000000 0000 @@ -73,7 +73,10 @@ zlib_error(z_stream zst, int err, char *msg) { const char *zmsg = zst.msg; - if (zmsg == Z_NULL) { + // Check for version error before using msg, as msg is not set in this case. + if (err == Z_VERSION_ERROR) { + zmsg = "different compile and link zlib versions"; + } else if (zmsg == Z_NULL) { switch (err) { case Z_BUF_ERROR: zmsg = "incomplete or truncated stream";