diff options
Diffstat (limited to 'gcc/gcov-io.c')
-rw-r--r-- | gcc/gcov-io.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/gcov-io.c b/gcc/gcov-io.c index 17fcae0..95ead22 100644 --- a/gcc/gcov-io.c +++ b/gcc/gcov-io.c @@ -493,7 +493,9 @@ gcov_read_words (unsigned words) const gcov_unsigned_t *result; unsigned excess = gcov_var.length - gcov_var.offset; - gcov_nonruntime_assert (gcov_var.mode > 0); + if (gcov_var.mode <= 0) + return NULL; + if (excess < words) { gcov_var.start += gcov_var.offset; |