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:
parent
3dcbc5cdaa
commit
4c7a1ec62a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue