GNU bug report logs -
#33133
26.1.50; zlib-decompress-region too rigid
Previous Next
Reported by: Katsumi Yamaoka <yamaoka <at> jpl.org>
Date: Tue, 23 Oct 2018 23:10:02 UTC
Severity: normal
Tags: fixed, patch
Found in version 26.1.50
Fixed in version 27.1
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> From: Noam Postavsky <npostavs <at> gmail.com>
> Date: Sat, 27 Oct 2018 17:48:26 -0400
> Cc: Kevin Ryde <user42_kevin <at> yahoo.com.au>, 33133 <at> debbugs.gnu.org
>
> Here's a proper patch.
Thanks. I have a few comments:
> +data. If @var{allow-partial} is @code{nil}, on failure, the function
We usually say "nil or omitted" for optional arguments. Also, I'd say
"then on failure, ...", otherwise this could be misinterpreted as if
"on failure" qualifies the "is nil" part.
Same comment regarding the doc string of the function.
> +leaves the region unchanged and returns @code{nil}. Otherwise, it
> +returns the number of bytes that were not decompressed and replaces
> +the region text by whatever data was successfully decompressed. This
> +function can be called only in unibyte buffers.
Maybe it would make sense here to say that this emulates what 'gzip'
does?
> + Lisp_Object ret = Qt;
> if (inflate_status != Z_STREAM_END)
> - return unbind_to (count, Qnil);
> + {
> + if (!NILP (allow_partial))
> + ret = make_int (iend - pos_byte);
> + else
> + return unbind_to (count, Qnil);
> + }
Hmm... should we display a warning message, like gzip does?
This bug report was last modified 6 years and 51 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.