+Wed Jun 14 17:19:09 1995 Sam Hartman <hartmans@tardis.MIT.EDU>
+
+ * srv_acl.c (acl_get_line): Check to make sure we haven't exceeded
+ the buffer size before overwriting the newline we may have just
+ read. If the newline is clobbered, there is no way of
+ distinguishing between a line that uses the full buffer from a
+ line longer than the full buffer. Also, cast EOF to a char, so
+ that it works on unsigned char systems. This means you can't
+ distinguish reading 0xff at the beginning of a line from EOF, but
+ the only other option is to introduce an intermediate variable.
+
+
Tue Jun 13 11:36:52 1995 Sam Hartman <hartmans@tardis.MIT.EDU>
* srv_net.c: Include sys/select.h if it is found.
(!feof(fp)) &&
((acl_buf[i] = fgetc(fp)) != '\n'));
i++);
- acl_buf[i] = '\0';
/* Check if we exceeded our buffer size */
if ((i == BUFSIZ) && (!feof(fp)) && (acl_buf[i] != '\n')) {
fprintf(stderr, acl_line2long_msg, acl_acl_file, *lnp);
while (fgetc(fp) != '\n');
}
- if (acl_buf[0] == EOF) /* ptooey */
+ acl_buf[i] = '\0';
+ if (acl_buf[0] == (char) EOF) /* ptooey */
acl_buf[0] = '\0';
else
(*lnp)++;