diff options
author | Remi Collet <remi@php.net> | 2016-02-22 18:18:30 +0100 |
---|---|---|
committer | Remi Collet <remi@php.net> | 2016-02-22 18:18:30 +0100 |
commit | 0d57c06b2c02678eeb724ea512b8ce4c85a339b2 (patch) | |
tree | 970c32773346253e255c92830b43ae49944ff868 /ext/zip/lib/zip_buffer.c | |
parent | 78b29310bc594502b117ccd96a5ffcc03e0b7b89 (diff) | |
download | php-git-0d57c06b2c02678eeb724ea512b8ce4c85a339b2.tar.gz |
update bundled libzip to 1.1.2
Diffstat (limited to 'ext/zip/lib/zip_buffer.c')
-rw-r--r-- | ext/zip/lib/zip_buffer.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/ext/zip/lib/zip_buffer.c b/ext/zip/lib/zip_buffer.c index 3d79b09f13..43864f9ba9 100644 --- a/ext/zip/lib/zip_buffer.c +++ b/ext/zip/lib/zip_buffer.c @@ -303,6 +303,17 @@ _zip_buffer_set_offset(zip_buffer_t *buffer, zip_uint64_t offset) } +int +_zip_buffer_skip(zip_buffer_t *buffer, zip_uint64_t length) { + zip_uint64_t offset = buffer->offset + length; + + if (offset < buffer->offset) { + buffer->ok = false; + return -1; + } + return _zip_buffer_set_offset(buffer, offset); +} + zip_uint64_t _zip_buffer_size(zip_buffer_t *buffer) { |