Commit
e7c0f0ad91fd removed uses of atoi with a new number parsing
functions. This broke parsing ip-reputation data files that contained
trailing carriage returns as it was being included in the number
string to convert.
Bug: #6243.
char *origline = line;
while (i < (int)line_len) {
- if (line[i] == ',' || line[i] == '\n' || line[i] == '\0' || i == (int)(line_len - 1)) {
+ if (line[i] == ',' || line[i] == '\n' || line[i] == '\r' || line[i] == '\0' ||
+ i == (int)(line_len - 1)) {
line[i] = '\0';
ptrs[idx] = line;