aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/network.c
diff options
context:
space:
mode:
Diffstat (limited to 'FICS/network.c')
-rw-r--r--FICS/network.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/FICS/network.c b/FICS/network.c
index c9fae65..b795e99 100644
--- a/FICS/network.c
+++ b/FICS/network.c
@@ -267,7 +267,9 @@ net_send_string(int fd, char *str, int format)
if ((which = findConnection(fd)) < 0)
return -1;
while (*str) {
- for (i = 0; str[i] >= ' '; i++) {
+ const int upbound = strlen(str);
+
+ for (i = 0; i < upbound && str[i] >= ' '; i++) {
/* null */;
}