typefindhelper: Fix signed integer overflow

Make sure the whole calculation is done with 64bit unsigned values

(To be ready for people want to typefind exabyte files).
This commit is contained in:
Edward Hervey 2017-11-04 10:34:10 +01:00 committed by Edward Hervey
parent d106390adc
commit 4ccdad084b

View file

@ -446,7 +446,7 @@ buf_helper_find_peek (gpointer data, gint64 off, guint size)
return NULL;
}
if ((off + size) <= helper->size)
if (((guint64) off + size) <= helper->size)
return helper->data + off;
return NULL;