commit | abaa7629b2303056e14fb735794a0fcfc2317a81 | [log] [tgz] |
---|---|---|
author | Christopher Tate <ctate@google.com> | Mon Jun 08 14:45:14 2015 -0700 |
committer | Christopher Tate <ctate@google.com> | Mon Jun 08 14:49:09 2015 -0700 |
tree | 02dd82c10959209ca369bf728b9ab68749f82ec7 | |
parent | 78183cc65c3a7bd267c570b371ee5ce3f4b5d63d [diff] |
Prevent integer overflow when calculating buffer resizes Make sure that we don't go haywire if an exponential buffer growth operation winds up wrapping integer range. Along the way, fix a bookkeeping bug in BufferedTextOutput that would cause it to keep spuriously realloc()ing on every append(). Bug 20674694 Change-Id: Ia845b7de36b90672a151a918ffc26c7da68e20a2