Make sure start pointer is legal in strtaglen()
strtaglen() takes care not go fall off the edge off the world... except if you make it start there. Oops.
This commit is contained in:
parent
6bada81529
commit
1b93f23579
|
@ -351,6 +351,8 @@ static inline int strtaglen(const char *str, rpm_count_t c, const char *end)
|
|||
const char *s;
|
||||
|
||||
if (end) {
|
||||
if (str >= end)
|
||||
return -1;
|
||||
while ((s = memchr(start, '\0', end-start))) {
|
||||
if (--c == 0 || s > end)
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue