diff options
author | Jordan Justen <[email protected]> | 2017-10-21 02:23:30 -0700 |
---|---|---|
committer | Jordan Justen <[email protected]> | 2017-10-31 23:36:54 -0700 |
commit | 4c7a1ec62a5fdb42fb175da28f7b6c5c13f6478f (patch) | |
tree | 46cfc44589a09fcaf891b5f584259f3feb851cb2 /src/compiler/blob.c | |
parent | 3dcbc5cdaa871f6ad2f123d0eb81f32fbfa7070b (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.c | 2 |
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; |