From owner-svn-src-user@freebsd.org Wed Oct 5 22:34:10 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0879AF50F0 for ; Wed, 5 Oct 2016 22:34:10 +0000 (UTC) (envelope-from pgollucci@p6m7g8.com) Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8666BF62 for ; Wed, 5 Oct 2016 22:34:10 +0000 (UTC) (envelope-from pgollucci@p6m7g8.com) Received: by mail-wm0-x22d.google.com with SMTP id f193so256156419wmg.0 for ; Wed, 05 Oct 2016 15:34:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=p6m7g8-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=gNnInE67WzWD86WvOFqDhta9DUzwv6JgYotibNQtxrg=; b=xEaqSpNQnee8HInfePsxqKsF2tUMUUz8H1rXxFiWGGY2QTvWwlh5XB/HfiEAvsRlvp GH1NrRJHoEYpMv1mqhX9lAzpw0QDdm+ERwpuJf3JjtkW3gNuJSI8Y+o5Fo2+WnJQDUN5 ymIJibdP6mOT9HvY1/2Z4wtL+wtSQKYcDafNF5OMO78dEEozw0+gLY4H9WA1qlt4KQH+ hfU8oq7Osf9SXTcHr7ETdq6sUSY93uLji3Lr1gkgAxfdb7TszFnkCfR6r6JJEg+5QZFl La9Wm7Vd3/YyC6Kk9wba8xKDe2kVe6ry+qKf7Tt11RFmIoq7uMdnwSqmjZ1r/2UQeFte YcBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=gNnInE67WzWD86WvOFqDhta9DUzwv6JgYotibNQtxrg=; b=HxoDV2pS9NPbSyowwUfBViFl6GV0IsYx+EeLH2TR7XhA0uGuTTKFViRpiW1NGuMFnm bQxCgnyTbXp1sPNlOc36NdMLNrrRvgwZg3faNQgV6UPrQ/2B0kCuxSxXtNd/1lh4HXW3 1XxL3+4XN67EuJN3jWND3IeALUaIDn570a40vo0LphAsD8Ilkh5CEOnQzWbTGPsuPOWs y4DrJkpHzL0TmCEFpry9PWem6B02LkJXuvWeZCFwfBEvr+JGhhvQeYqcoTOH2s+yUU6p ys9mG+PoMnNr8Cw4R/bOHksJSdvi4yeUy14Ohw1W0UkiJyimE52ogM5KX9bq9T1jNGAL X8vg== X-Gm-Message-State: AA6/9RlUoBF8TTifD4Maub6s4/WgG+npvsLnaYOrI6BMGE87zuqliit2532lC2jkBh8HizYVoOXwlwGO9aIV3A== X-Received: by 10.28.229.149 with SMTP id c143mr2989322wmh.95.1475706849122; Wed, 05 Oct 2016 15:34:09 -0700 (PDT) MIME-Version: 1.0 Received: by 10.80.183.197 with HTTP; Wed, 5 Oct 2016 15:33:28 -0700 (PDT) X-Originating-IP: [108.31.198.207] In-Reply-To: <201610051803.u95I3Hq1040052@repo.freebsd.org> References: <201610051803.u95I3Hq1040052@repo.freebsd.org> From: "Philip M. Gollucci" Date: Wed, 5 Oct 2016 18:33:28 -0400 Message-ID: Subject: Re: svn commit: r306713 - in user/alc/PQ_LAUNDRY: lib/libc/stdlib lib/msun/ld80 lib/msun/src sys/cam sys/vm To: Alan Cox Cc: src-committers@freebsd.org, svn-src-user@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Oct 2016 22:34:11 -0000 I know you(Alan) didn't write this, its from the MFH, but how would len != expected. neither are initialized or passed in both times its set its expected = len = foo On Wed, Oct 5, 2016 at 2:03 PM, Alan Cox wrote: > Modified: user/alc/PQ_LAUNDRY/lib/libc/stdlib/random.c > ============================================================ > ================== > --- user/alc/PQ_LAUNDRY/lib/libc/stdlib/random.c Wed Oct 5 > 17:32:06 2016 (r306712) > +++ user/alc/PQ_LAUNDRY/lib/libc/stdlib/random.c Wed Oct 5 > 18:03:17 2016 (r306713) > @@ -270,16 +270,17 @@ void > srandomdev(void) > { > int mib[2]; > - size_t len; > + size_t expected, len; > > if (rand_type == TYPE_0) > - len = sizeof(state[0]); > + expected = len = sizeof(state[0]); > else > - len = rand_deg * sizeof(state[0]); > + expected = len = rand_deg * sizeof(state[0]); > > mib[0] = CTL_KERN; > mib[1] = KERN_ARND; > - sysctl(mib, 2, state, &len, NULL, 0); > + if (sysctl(mib, 2, state, &len, NULL, 0) == -1 || len != expected) > + abort(); > > if (rand_type != TYPE_0) { > fptr = &state[rand_sep]; > -- --------------------------------------------------------------------------------- 4096R/D21D2752 ECDF B597 B54B 7F92 753E E0EA F699 A450 D21D 2752 Philip M. Gollucci (pgollucci@p6m7g8.com) c: 703.336.9354 Member, Apache Software Foundation Committer, FreeBSD Foundation Consultant, P6M7G8 Inc. Director Cloud Technology, Capital One What doesn't kill us can only make us stronger; Except it almost kills you.