Author: loos
Date: Mon Feb 3 17:25:36 2014
New Revision: 261440
URL: http://svnweb.freebsd.org/changeset/base/261440
Log:
Fix a logic error. Because of this inflateReset() wasn't being called and
the output buffer wasn't being cleared between the inflate() calls,
producing zeroed output after the first inflate() call.
This fixes the read of mkuzip(8) images with geom_uncompress(4).
Reviewed by: ray
Approved by: adrian (mentor)
Modified:
head/sys/geom/uncompress/g_uncompress.c
Modified: head/sys/geom/uncompress/g_uncompress.c
==============================================================================
--- head/sys/geom/uncompress/g_uncompress.c Mon Feb 3 17:21:36 2014
(r261439)
+++ head/sys/geom/uncompress/g_uncompress.c Mon Feb 3 17:25:36 2014
(r261440)
@@ -264,7 +264,7 @@ g_uncompress_done(struct bio *bp)
err = (inflate(sc->zs, Z_FINISH) != Z_STREAM_END) ?
1 : 0;
- if ((err) && (inflateReset(sc->zs) != Z_OK))
+ if ((err) || (inflateReset(sc->zs) != Z_OK))
printf("%s: UZIP decoder reset failed\n",
gp->name);
break;
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"