- memcpy(tmp, str, min(sizeof(tmp) - 1,
- (int)(found - str)));
- cur_lineinfo.lineno = strtoul(tmp, NULL, 10) - 1;
- str = found;
- str++;
+ memcpy(tmp, str, min(sizeof(tmp) - 1, (size_t)(found - str)));
+ cur_lineinfo.lineno = strtoul(tmp, &tail, 0);
+ if (*tail != '\0')
+ goto error;
+ str = strip_leading_ws(found);