From owner-svn-src-all@freebsd.org Tue Mar 7 02:14:24 2017 Return-Path: Delivered-To: svn-src-all@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 589A0D00C8D; Tue, 7 Mar 2017 02:14:24 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) (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 EDB0211F0; Tue, 7 Mar 2017 02:14:23 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-wm0-f45.google.com with SMTP id v186so78427087wmd.0; Mon, 06 Mar 2017 18:14:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=C8zsQH1iZE9ofQ177mwz6YrF8E4iXgQIgG+iqXkz6PA=; b=J4XPQlA7YM1FexLWopAwUkIO00MkjrGO/zYzsSHuxCxDPuM+jcXP6Dwnq8bn2qb01m eTNPlBBQfKE8f+9XQA7FKJ6lnW14XdpYMAV6rq2ANupx4JFW1faLO3gYP54LJu2FHk07 IyBs69XobXZxHdjO0Q+G0THrwu7O3TTg5xxVR/Jiz/B8b7M/C7s6NS0C6+C6YxmdIogS nzlffBA7xxmGyZd9Eh4z7lrVfLyPxvQHs6mgzWzk9Qq8NWOgy5pHYj/G2MmxuvSTumnx OgWDvxtxKUK1dBvbkGh5fifjRD6s4b10p/E2BCEB4MCUer8PCpaflKO4yndUQDRGzzhM grhw== X-Gm-Message-State: AMke39lbSKNcQf9ePLUK8Esu3cDLrDyLSmys6SGzt9Fjo3NloK7Ir8nZLdiEN1iZxjI/1A== X-Received: by 10.28.74.194 with SMTP id n63mr10950564wmi.15.1488852856431; Mon, 06 Mar 2017 18:14:16 -0800 (PST) Received: from mail-wr0-f169.google.com (mail-wr0-f169.google.com. [209.85.128.169]) by smtp.gmail.com with ESMTPSA id w17sm29178873wra.28.2017.03.06.18.14.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Mar 2017 18:14:16 -0800 (PST) Received: by mail-wr0-f169.google.com with SMTP id u108so129175782wrb.3; Mon, 06 Mar 2017 18:14:16 -0800 (PST) X-Received: by 10.223.160.243 with SMTP id n48mr18382615wrn.198.1488852856198; Mon, 06 Mar 2017 18:14:16 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.80.169.4 with HTTP; Mon, 6 Mar 2017 18:14:15 -0800 (PST) In-Reply-To: <201703061545.v26FjkNI027057@repo.freebsd.org> References: <201703061545.v26FjkNI027057@repo.freebsd.org> From: Conrad Meyer Date: Mon, 6 Mar 2017 18:14:15 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r314780 - head/lib/libpam/modules/pam_exec To: "Pedro F. Giffuni" Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Mar 2017 02:14:24 -0000 Thanks for fixing the commit log this way. It makes 'svn annotate' history correct. IMO this is strongly preferable to a "forced commit." Best, Conrad On Mon, Mar 6, 2017 at 7:45 AM, Pedro F. Giffuni wrote: > Author: pfg > Date: Mon Mar 6 15:45:46 2017 > New Revision: 314780 > URL: https://svnweb.freebsd.org/changeset/base/314780 > > Log: > libpam: extra bounds checking through reallocarray(3). > > Reviewed by: des > MFC after: 1 week > > Modified: > head/lib/libpam/modules/pam_exec/pam_exec.c > > Modified: head/lib/libpam/modules/pam_exec/pam_exec.c > ============================================================================== > --- head/lib/libpam/modules/pam_exec/pam_exec.c Mon Mar 6 15:42:03 2017 (r314779) > +++ head/lib/libpam/modules/pam_exec/pam_exec.c Mon Mar 6 15:45:46 2017 (r314780) > @@ -138,7 +138,7 @@ _pam_exec(pam_handle_t *pamh __unused, > nitems = sizeof(env_items) / sizeof(*env_items); > /* Count PAM return values put in the environment. */ > nitems_rv = options->return_prog_exit_status ? PAM_RV_COUNT : 0; > - tmp = realloc(envlist, (envlen + nitems + 1 + nitems_rv + 1) * > + tmp = reallocarray(envlist, envlen + nitems + 1 + nitems_rv + 1, > sizeof(*envlist)); > if (tmp == NULL) { > openpam_free_envlist(envlist); >