diff options
author | David Nugent <davidn@FreeBSD.org> | 1996-12-17 01:43:30 +0000 |
---|---|---|
committer | David Nugent <davidn@FreeBSD.org> | 1996-12-17 01:43:30 +0000 |
commit | a36f769f47060acc982d2d8fe235e21fde26b4f5 (patch) | |
tree | 48208376bd61c84d711ba9366f34020340f19fdd /usr.sbin/pw | |
parent | 24eb54aa11e1788a1daea6e11d016c49b8eb3b29 (diff) | |
download | src-a36f769f47060acc982d2d8fe235e21fde26b4f5.tar.gz src-a36f769f47060acc982d2d8fe235e21fde26b4f5.zip |
Submitted by: proff@iq.org
Minor fix for security patch.
Notes
Notes:
svn path=/head/; revision=20576
Diffstat (limited to 'usr.sbin/pw')
-rw-r--r-- | usr.sbin/pw/pw_user.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/pw/pw_user.c b/usr.sbin/pw/pw_user.c index 150c71c7b016..b70d68c3fdc5 100644 --- a/usr.sbin/pw/pw_user.c +++ b/usr.sbin/pw/pw_user.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: pw_user.c,v 1.2 1996/12/11 15:10:47 joerg Exp $ + * $Id: pw_user.c,v 1.3 1996/12/16 17:37:58 davidn Exp $ */ #include <unistd.h> @@ -771,7 +771,7 @@ pw_getrand(u_char *buf, int len) { int fd; fd = open("/dev/urandom", O_RDONLY); - if (!fd || read(fd, buf, len)!=len) { + if (fd==-1 || read(fd, buf, len)!=len) { int n; for (n=0;n<len;n+=16) { u_char ubuf[16]; |