aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJoakim Verona2013-08-13 17:16:25 +0200
committerJoakim Verona2013-08-13 17:16:25 +0200
commit7cb2f8b52926d37347e5a412abd7a004707258a6 (patch)
tree5cbd59c8cc90806a82ba504fae3ea10e9079ea11 /src
parent2da59f810184f36b4061eb422011de057bd0588e (diff)
parent53b64418c20b6288e0e3a589b61db47861a575b6 (diff)
downloademacs-7cb2f8b52926d37347e5a412abd7a004707258a6.tar.gz
emacs-7cb2f8b52926d37347e5a412abd7a004707258a6.zip
merge from trunk
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog4
-rw-r--r--src/decompress.c9
2 files changed, 10 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index dabc6241967..0c8de046034 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
12013-08-13 Paul Eggert <eggert@cs.ucla.edu>
2
3 * decompress.c (Fzlib_decompress_region): Try to clarify 'avail_out'.
4
12013-08-13 Dmitry Antipov <dmantipov@yandex.ru> 52013-08-13 Dmitry Antipov <dmantipov@yandex.ru>
2 6
3 * window.h (struct window): Convert left_margin_cols and 7 * window.h (struct window): Convert left_margin_cols and
diff --git a/src/decompress.c b/src/decompress.c
index a09033ab8c3..b7cd8a6c404 100644
--- a/src/decompress.c
+++ b/src/decompress.c
@@ -26,6 +26,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
26#include "character.h" 26#include "character.h"
27#include "buffer.h" 27#include "buffer.h"
28 28
29#include <verify.h>
30
29static Lisp_Object Qzlib_dll; 31static Lisp_Object Qzlib_dll;
30 32
31#ifdef WINDOWSNT 33#ifdef WINDOWSNT
@@ -178,10 +180,11 @@ This function can be called only in unibyte buffers. */)
178 do 180 do
179 { 181 {
180 /* Maximum number of bytes that one 'inflate' call should read and write. 182 /* Maximum number of bytes that one 'inflate' call should read and write.
181 zlib requires that these values not exceed UINT_MAX. 183 Do not make avail_out too large, as that might unduly delay C-g.
182 Do not make avail_out too large, as that might unduly delay C-g. */ 184 In any case zlib requires that these values not exceed UINT_MAX. */
183 ptrdiff_t avail_in = min (iend - pos_byte, UINT_MAX); 185 ptrdiff_t avail_in = min (iend - pos_byte, UINT_MAX);
184 ptrdiff_t avail_out = min (1 << 14, UINT_MAX); 186 enum { avail_out = 1 << 14 };
187 verify (avail_out <= UINT_MAX);
185 188
186 ptrdiff_t decompressed; 189 ptrdiff_t decompressed;
187 190