View | Details | Raw Unified | Return to bug 16900
Collapse All | Expand All

(-)natd.c Mon Feb 21 23:12:32 2000 (-2 / +5 lines)
Lines 1262-1269 Link Here
1262
       while (fgets (buf, sizeof (buf), file)) {
1262
       while (fgets (buf, sizeof (buf), file)) {
1263
1263
1264
               ptr = strchr (buf, '\n');
1264
               ptr = strchr (buf, '\n');
1265
               if (!ptr)
1265
               if (!ptr) {
1266
                       errx (1, "config line too long: %s", buf);
1266
                       ptr = strchr (buf, '\0');
1267
                       if ( ptr && ( ( ptr - buf + 1 ) == sizeof (buf) ) )
1268
                               errx (1, "config line too long: %s", buf);
1269
               }
1267
1270
1268
               *ptr = '\0';
1271
               *ptr = '\0';

Return to bug 16900