Fix gzinflate for strings larger than 128M
commite8d372f813155d591a52cf26c6372ae103ad6a4c
authorjdelong <jdelong@fb.com>
Mon, 11 Mar 2013 23:43:28 +0000 (11 16:43 -0700)
committerSara Golemon <sgolemon@fb.com>
Tue, 12 Mar 2013 21:22:13 +0000 (12 14:22 -0700)
tree0d9af5cc0a5edb41f1a3a32ffc2af57970e9e88d
parent6ddef58d562544470cb8a8fed16c1c74cd76161f
Fix gzinflate for strings larger than 128M

gzinflate tries to do some kind of exponential growth that
hits the max string limit immediately when you try to deflate a string
larger than 128 megs.  The logic is a little convoluted with a few
ways to bail, but rather than try to really fix it I just made it
behave close to the same on small strings, but use a smaller starting
factor on long ones and be willing to try to deflate it into a
max-sized string.
hphp/runtime/ext/ext_zlib.cpp