From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 93054 invoked by alias); 6 Sep 2018 11:28:51 -0000 Mailing-List: contact newlib-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: newlib-cvs-owner@sourceware.org Received: (qmail 92999 invoked by uid 9078); 6 Sep 2018 11:28:50 -0000 Date: Thu, 06 Sep 2018 11:28:00 -0000 Message-ID: <20180906112850.92997.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Corinna Vinschen To: newlib-cvs@sourceware.org Subject: [newlib-cygwin] stdlib/arc4random.c: Fix reseed count for 16-bit targets. X-Act-Checkin: newlib-cygwin X-Git-Author: Jon Beniston X-Git-Refname: refs/heads/master X-Git-Oldrev: 85c030a75f1c9ab2e30f3a56e7fa3128d1f4c833 X-Git-Newrev: 7283d2513c19618785d983e254005b9d36c7068e X-SW-Source: 2018-q3/txt/msg00114.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=7283d2513c19618785d983e254005b9d36c7068e commit 7283d2513c19618785d983e254005b9d36c7068e Author: Jon Beniston Date: Wed Sep 5 10:57:33 2018 +0100 stdlib/arc4random.c: Fix reseed count for 16-bit targets. Diff: --- newlib/libc/stdlib/arc4random.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/newlib/libc/stdlib/arc4random.c b/newlib/libc/stdlib/arc4random.c index 3cccc3e..7632de1 100644 --- a/newlib/libc/stdlib/arc4random.c +++ b/newlib/libc/stdlib/arc4random.c @@ -99,7 +99,7 @@ _rs_stir(void) rs->rs_have = 0; memset(rsx->rs_buf, 0, sizeof(rsx->rs_buf)); - rs->rs_count = 1600000; + rs->rs_count = (SIZE_MAX <= 65535) ? 65000 : 1600000; } static inline void