Reported by: imp
MFC after: 3 weeks
X-MFC-With: 318141, 318143
Sponsored by: Spectra Logic Corp
char salt[SALTSIZE + 1];
char *cryptpw;
static char buf[256];
+ size_t pwlen;
/*
* Calculate a salt value
cryptpw = crypt(password, salt);
if (cryptpw == NULL)
errx(EX_CONFIG, "crypt(3) failure");
- assert(strlcpy(buf, cryptpw, sizeof(buf)) < sizeof(buf));
+ pwlen = strlcpy(buf, cryptpw, sizeof(buf));
+ assert(pwlen < sizeof(buf));
return (buf);
}