diff options
Diffstat (limited to 'module/bsnmp-regex.c')
-rw-r--r-- | module/bsnmp-regex.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/module/bsnmp-regex.c b/module/bsnmp-regex.c index 5a77d6e..d30679b 100644 --- a/module/bsnmp-regex.c +++ b/module/bsnmp-regex.c @@ -330,8 +330,8 @@ process_result (struct data_entry *data, char *line, int len, #else /* WITH_PCRE */ if (pm[idx].rm_so != -1 && pm[idx].rm_eo != -1) { ASSERT (pm[idx].rm_eo >= pm[idx].rm_so); - ASSERT (pm[idx].rm_eo < len); - ASSERT (pm[idx].rm_so < len); + ASSERT (pm[idx].rm_eo <= len); + ASSERT (pm[idx].rm_so <= len); rlen += (pm[idx].rm_eo - pm[idx].rm_so); rlen += 1; } @@ -491,7 +491,7 @@ io_data (int fd, void *user_data) break; } - n = t; + n = t + 1; /* Break line (also DOS line) */ *t = 0; @@ -504,7 +504,7 @@ io_data (int fd, void *user_data) /* Move data to front of buffer */ len -= (n - line_buffer); - memmove (line_buffer, n, len); + memmove (line_buffer, n, len + 1); } } while (r > 0); |