Skip to content

Commit

Permalink
Nooooo... integer overflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldmccarthy committed Oct 17, 2016
1 parent 76ed069 commit ef3e481
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zran.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ static int _zran_free_unused(
* Returns the current limit of the index, i.e. how much of the file is covered
* by the index.
*/
static int _zran_index_limit(
static uint64_t _zran_index_limit(
zran_index_t *index, /* The index */
uint8_t compressed /* Pass in non-0 to get the compressed stream limit,
or 0 for the uncompressed limit. */
Expand Down Expand Up @@ -520,7 +520,7 @@ int zran_init(zran_index_t *index,


/* Returns the compressed or uncompressed index limit. */
int _zran_index_limit(zran_index_t *index, uint8_t compressed) {
uint64_t _zran_index_limit(zran_index_t *index, uint8_t compressed) {

if (index->npoints == 0)
return 0;
Expand Down

0 comments on commit ef3e481

Please sign in to comment.