From: Jordan Justen Date: Sat, 21 Oct 2017 09:23:30 +0000 (-0700) Subject: blob: Don't set overrun if reading 0 bytes at end of data X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4c7a1ec62a5fdb42fb175da28f7b6c5c13f6478f;p=mesa.git blob: Don't set overrun if reading 0 bytes at end of data Signed-off-by: Jordan Justen Reviewed-by: Jason Ekstrand --- diff --git a/src/compiler/blob.c b/src/compiler/blob.c index 8dd254fefc6..5e8671b7b44 100644 --- a/src/compiler/blob.c +++ b/src/compiler/blob.c @@ -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;