From 1a6c1df2a699df57fe6298efe01c7ed0a981ce04 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Tue, 9 Dec 2014 19:50:27 +0000 Subject: random seed buffer must be unsigned --- lib/libc/stdlib/drand48.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/libc/stdlib') diff --git a/lib/libc/stdlib/drand48.c b/lib/libc/stdlib/drand48.c index bbeedf8a8ac..e7cb3cb71c7 100644 --- a/lib/libc/stdlib/drand48.c +++ b/lib/libc/stdlib/drand48.c @@ -1,4 +1,4 @@ -/* $OpenBSD: drand48.c,v 1.4 2014/12/08 21:45:20 deraadt Exp $ */ +/* $OpenBSD: drand48.c,v 1.5 2014/12/09 19:50:26 deraadt Exp $ */ /* * Copyright (c) 1993 Martin Birgmeier * All rights reserved. @@ -20,7 +20,7 @@ double drand48(void) { if (__rand48_deterministic == 0) { - short rseed[3]; + unsigned short rseed[3]; arc4random_buf(rseed, sizeof rseed); return ldexp((double) rseed[0], -48) + -- cgit v1.2.3