tcp_wrappers/tcp_wrappers-7.6-xgets.patch

13 lines
440 B
Diff
Raw Normal View History

2011-08-15 09:58:45 +00:00
diff -up tcp_wrappers_7.6/misc.c.xgets tcp_wrappers_7.6/misc.c
--- tcp_wrappers_7.6/misc.c.xgets 2011-08-15 05:50:26.403091995 -0400
+++ tcp_wrappers_7.6/misc.c 2011-08-15 05:51:02.289091985 -0400
@@ -35,7 +35,7 @@ FILE *fp;
int got;
char *start = ptr;
- while (fgets(ptr, len, fp)) {
+ while (len && fgets(ptr, len, fp)) {
got = strlen(ptr);
if (got >= 1 && ptr[got - 1] == '\n') {
tcpd_context.line++;