From 6960cf009310003dfc79d5a3f9bf9d3db2105a7f Mon Sep 17 00:00:00 2001 From: Brian Somers Date: Mon, 20 Aug 2001 15:09:34 +0000 Subject: Handle snprintf() returning < 0 (not just -1) MFC after: 2 weeks --- pw/pwupd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pw/pwupd.c') diff --git a/pw/pwupd.c b/pw/pwupd.c index ec29b9e..67a816f 100644 --- a/pw/pwupd.c +++ b/pw/pwupd.c @@ -166,7 +166,7 @@ pw_update(struct passwd * pwd, char const * user, int mode) else fmtpwentry(pwbuf, pwd, PWF_PASSWD); - if (l == -1) + if (l < 0) l = 0; rc = fileupdate(getpwpath(_PASSWD), 0644, pwbuf, pfx, l, mode); if (rc == 0) { -- cgit v1.2.3