Skip to content

Commit

Permalink
update puff to fix gzip crash
Browse files Browse the repository at this point in the history
  • Loading branch information
arvidn committed Sep 12, 2016
1 parent e650ecc commit 2d7d012
Show file tree
Hide file tree
Showing 4 changed files with 149 additions and 150 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
@@ -1,3 +1,5 @@
* update puff to fix gzip crash

1.0.10 release

* fixed inverted priority of incoming piece suggestions
Expand Down
10 changes: 4 additions & 6 deletions include/libtorrent/puff.hpp
Expand Up @@ -25,9 +25,7 @@
/*
* See puff.c for purpose and usage.
*/
#include <boost/cstdint.hpp>

int puff(unsigned char *dest, /* pointer to destination pointer */
boost::uint32_t *destlen, /* amount of output space */
unsigned char *source, /* pointer to source data pointer */
boost::uint32_t *sourcelen); /* amount of input available */
int puff(unsigned char* dest, /* pointer to destination pointer */
unsigned long* destlen, /* amount of output space */
unsigned char const* source, /* pointer to source data pointer */
unsigned long* sourcelen); /* amount of input available */
4 changes: 2 additions & 2 deletions src/gzip.cpp
Expand Up @@ -202,9 +202,9 @@ namespace libtorrent

// start off with 4 kilobytes and grow
// if needed
boost::uint32_t destlen = 4096;
unsigned long destlen = 4096;
int ret = 0;
boost::uint32_t srclen = size - header_len;
unsigned long srclen = size - header_len;
in += header_len;

do
Expand Down

0 comments on commit 2d7d012

Please sign in to comment.