зеркало из https://github.com/github/ruby.git
* ext/zlib/zlib.c (zstream_expand_buffer_without_gvl): Use
ruby_xrealloc() to avoid crash with CALC_EXACT_MALLOC_SIZE. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
e57bc077f3
Коммит
7182c0005c
|
@ -1,3 +1,8 @@
|
||||||
|
Fri Jul 6 04:05:59 2012 Eric Hodel <drbrain@segment7.net>
|
||||||
|
|
||||||
|
* ext/zlib/zlib.c (zstream_expand_buffer_without_gvl): Use
|
||||||
|
ruby_xrealloc() to avoid crash with CALC_EXACT_MALLOC_SIZE.
|
||||||
|
|
||||||
Thu Jul 5 17:32:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Thu Jul 5 17:32:19 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* internal.h: move ThreadShield declarations from intern.h.
|
* internal.h: move ThreadShield declarations from intern.h.
|
||||||
|
|
|
@ -679,7 +679,7 @@ zstream_expand_buffer_without_gvl(struct zstream *z)
|
||||||
|
|
||||||
len = z->buf_filled + inc;
|
len = z->buf_filled + inc;
|
||||||
|
|
||||||
new_str = realloc(RSTRING(z->buf)->as.heap.ptr, len + 1);
|
new_str = ruby_xrealloc(RSTRING(z->buf)->as.heap.ptr, len + 1);
|
||||||
|
|
||||||
if (!new_str)
|
if (!new_str)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче