blob: Don't set overrun if reading 0 bytes at end of data

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Jordan Justen 2017-10-21 02:23:30 -07:00
parent 3dcbc5cdaa
commit 4c7a1ec62a
1 changed files with 1 additions and 1 deletions

View File

@ -256,7 +256,7 @@ ensure_can_read(struct blob_reader *blob, size_t size)
if (blob->overrun)
return false;
if (blob->current < blob->end && blob->end - blob->current >= size)
if (blob->current <= blob->end && blob->end - blob->current >= size)
return true;
blob->overrun = true;