FreeBSD Bugzilla – Attachment 9724 Details for
Bug 19793
[PATCH] ipfilter - improve line reading
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 583 bytes, created by
spock
on 2000-07-09 06:40:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
spock
Created:
2000-07-09 06:40:00 UTC
Size:
583 bytes
patch
obsolete
>--- /tmp/ipf.c Wed Jul 5 00:20:50 2000 >+++ contrib/ipfilter/ipf.c Sun Jul 9 01:02:35 2000 >@@ -347,12 +347,20 @@ > if (fgets(p, s, file) == NULL) > return (NULL); > len = strlen(p); >+ if (p[len - 1] != '\n') { >+ p[len] = '\0'; >+ break; >+ } > p[len - 1] = '\0'; >- if (p[len - 1] != '\\') >+ if (len < 2 || p[len - 2] != '\\') > break; >- size -= len; >+ else { >+ /* Convert '\\' to a space so words don't run together */ >+ p[len - 2] = ' '; >+ len--; >+ } > } >- } while (*str == '\0' || *str == '\n'); >+ } while (*str == '\0'); > return (str); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 19793
: 9724