summaryrefslogtreecommitdiff
path: root/chat
diff options
context:
space:
mode:
authorFrank Cusack <fcusack@fcusack.com>2003-02-26 10:18:10 +0000
committerFrank Cusack <fcusack@fcusack.com>2003-02-26 10:18:10 +0000
commitc4aa99cfadf0d5de94be64b8e76d7fbbf415b4df (patch)
treea63002fb58565f8b0e3b85731de4a602b6c0ef00 /chat
parent3250c63462a66ae53cc381aecaae556bd60497e1 (diff)
downloadppp-c4aa99cfadf0d5de94be64b8e76d7fbbf415b4df.tar.gz
style
Diffstat (limited to 'chat')
-rw-r--r--chat/chat.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/chat/chat.c b/chat/chat.c
index a69d66a..14db281 100644
--- a/chat/chat.c
+++ b/chat/chat.c
@@ -87,7 +87,7 @@
#endif
#ifndef lint
-static const char rcsid[] = "$Id: chat.c,v 1.27 2002/01/11 18:05:44 etbe Exp $";
+static const char rcsid[] = "$Id: chat.c,v 1.28 2003/02/26 10:18:10 fcusack Exp $";
#endif
#include <stdio.h>
@@ -1092,8 +1092,8 @@ register char *s;
fatal(2, "Too many REPORT strings");
s1 = clean(s, 0);
-
- if (strlen(s1) > strlen(s) || strlen(s1) > sizeof fail_buffer - 1)
+ if (strlen(s1) > strlen(s)
+ || strlen(s1) + 1 > sizeof(fail_buffer))
fatal(1, "Illegal or too-long REPORT string ('%v')", s);
report_string[n_reports++] = s1;
@@ -1113,7 +1113,8 @@ register char *s;
s1 = clean(s, 0);
- if (strlen(s1) > strlen(s) || strlen(s1) > sizeof fail_buffer - 1)
+ if (strlen(s1) > strlen(s)
+ || strlen(s1) + 1 > sizeof(fail_buffer))
fatal(1, "Illegal or too-long REPORT string ('%v')", s);
old_max = n_reports;