CVE-2014-8117.6.6bf4527.patch 643 B

1234567891011121314151617181920
  1. Subject: Don't bail if there was no error, buf could have been NULL on entry
  2. ID: CVE-2014-8117
  3. Upstream-Author: Christos Zoulas <christos@zoulas.com>
  4. Date: Thu Dec 4 15:22:05 2014 +0000
  5. Origin: FILE5_20-42-g6bf4527
  6. Last-Update: 2015-01-05
  7. diff --git a/src/softmagic.c b/src/softmagic.c
  8. index 9a13acb..50aca88 100644
  9. --- a/src/softmagic.c
  10. +++ b/src/softmagic.c
  11. @@ -1637,7 +1637,7 @@ mget(struct magic_set *ms, const unsigned char *s,
  12. fprintf(stderr, "indirect @offs=%u[%d]\n", offset, rv);
  13. rbuf = file_pop_buffer(ms, pb);
  14. - if (rbuf == NULL)
  15. + if (rbuf == NULL && ms->event_flags & EVENT_HAD_ERR)
  16. return -1;
  17. if (rv == 1) {