1234567891011121314151617 |
- Upstream-Author: Christos Zoulas <christos@zoulas.com>
- Date: Tue Mar 4 17:42:19 2014 +0000
- Upstream-Commit: 70c65d2e1841491f59168db1f905e8b14083fb1c
- Description:
- off by one in out of bounds calculations (Jan Kaluza)
- --- a/src/softmagic.c
- +++ b/src/softmagic.c
- @@ -71,7 +71,7 @@
- private void cvt_32(union VALUETYPE *, const struct magic *);
- private void cvt_64(union VALUETYPE *, const struct magic *);
-
- -#define OFFSET_OOB(n, o, i) ((n) < (o) || (i) >= ((n) - (o)))
- +#define OFFSET_OOB(n, o, i) ((n) < (o) || (i) > ((n) - (o)))
- /*
- * softmagic - lookup one file in parsed, in-memory copy of database
- * Passed the name and FILE * of one file to be typed.
|