aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/mail/fio.c
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>2001-08-20 14:46:40 +0000
committerBrian Somers <brian@FreeBSD.org>2001-08-20 14:46:40 +0000
commitcbe1d3b6307020778153ec838f67bbcd9f5b46b0 (patch)
treee5d043e9d5f4a4d826f6abc4af426f8e7b4410a0 /usr.bin/mail/fio.c
parent5f32890558c65f1b0e7a68ed17b2ce5f50058864 (diff)
downloadsrc-cbe1d3b6307020778153ec838f67bbcd9f5b46b0.tar.gz
src-cbe1d3b6307020778153ec838f67bbcd9f5b46b0.zip
Handle snprintf() returning -1.
MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=81979
Diffstat (limited to 'usr.bin/mail/fio.c')
-rw-r--r--usr.bin/mail/fio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/mail/fio.c b/usr.bin/mail/fio.c
index 0fb86b33e7e6..0a017ce5e1b9 100644
--- a/usr.bin/mail/fio.c
+++ b/usr.bin/mail/fio.c
@@ -419,7 +419,7 @@ getfold(name, namelen)
else
copylen = snprintf(name, namelen, "%s/%s",
homedir ? homedir : ".", folder);
- return (copylen >= namelen ? (-1) : (0));
+ return (copylen < 0 || copylen >= namelen ? (-1) : (0));
}
/*