Skip to content

Commit 69e829b

Browse files
spinaevvictorjulien
authored andcommitted
reputation: remove unused code
Remove useless while() that led to buffer underflow Ticket: OISF#8500 (cherry picked from commit 2e22ba6)
1 parent 59ebaf4 commit 69e829b

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

src/reputation.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -373,8 +373,6 @@ int SRepLoadCatFileFromFD(FILE *fp)
373373
if (line[0] == '\n' || line [0] == '\r' || line[0] == ' ' || line[0] == '#' || line[0] == '\t')
374374
continue;
375375

376-
while (isspace((unsigned char)line[--len]));
377-
378376
/* Check if we have a trailing newline, and remove it */
379377
len = strlen(line);
380378
if (len == 0)
@@ -433,8 +431,6 @@ int SRepLoadFileFromFD(SRepCIDRTree *cidr_ctx, FILE *fp)
433431
if (line[0] == '\n' || line [0] == '\r' || line[0] == ' ' || line[0] == '#' || line[0] == '\t')
434432
continue;
435433

436-
while (isspace((unsigned char)line[--len]));
437-
438434
/* Check if we have a trailing newline, and remove it */
439435
len = strlen(line);
440436
if (len == 0)

0 commit comments

Comments
 (0)