summaryrefslogtreecommitdiffstats
path: root/src/compiler/blob.c
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2017-10-21 02:23:30 -0700
committerJordan Justen <[email protected]>2017-10-31 23:36:54 -0700
commit4c7a1ec62a5fdb42fb175da28f7b6c5c13f6478f (patch)
tree46cfc44589a09fcaf891b5f584259f3feb851cb2 /src/compiler/blob.c
parent3dcbc5cdaa871f6ad2f123d0eb81f32fbfa7070b (diff)
blob: Don't set overrun if reading 0 bytes at end of data
Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/blob.c')
-rw-r--r--src/compiler/blob.c2
1 files changed, 1 insertions, 1 deletions
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;