12345678910111213141516 |
- Subject: PR/598: Off-by-one
- Origin: FILE5_30-11-gb1b4efea
- Upstream-Author: Christos Zoulas <christos@zoulas.com>
- Date: Tue Mar 7 22:36:10 2017 +0000
- --- a/src/softmagic.c
- +++ b/src/softmagic.c
- @@ -1842,7 +1842,7 @@
- v = 0;
-
- for (idx = 0; m->str_range == 0 || idx < m->str_range; idx++) {
- - if (slen + idx >= ms->search.s_len)
- + if (slen + idx > ms->search.s_len)
- return 0;
-
- v = file_strncmp(m->value.s, ms->search.s + idx, slen,
|