From owner-svn-src-head@freebsd.org Wed Jan 27 15:30:42 2016 Return-Path: Delivered-To: svn-src-head@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 416E5A70AB6; Wed, 27 Jan 2016 15:30:42 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from shxd.cx (mail.shxd.cx [64.201.244.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 34FAF1EFF; Wed, 27 Jan 2016 15:30:42 +0000 (UTC) (envelope-from devin@shxd.cx) Received: from [64.201.244.132] (port=50709 helo=[10.0.0.113]) by shxd.cx with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.77 (FreeBSD)) (envelope-from ) id 1aOS3G-000IjR-S6; Wed, 27 Jan 2016 07:30:35 -0800 Message-ID: <1453908634.4517.2.camel@FreeBSD.org> Subject: Re: svn commit: r294893 - head/lib/libdpv From: Devin Teske To: Ruslan Bukin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, dteske@FreeBSD.org Date: Wed, 27 Jan 2016 07:30:34 -0800 In-Reply-To: <20160127110306.GA92213@bsdpad.com> References: <201601270621.u0R6LZPd030494@repo.freebsd.org> <20160127110306.GA92213@bsdpad.com> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.16.5 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: devin@shxd.cx X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jan 2016 15:30:42 -0000 On Wed, 2016-01-27 at 11:03 +0000, Ruslan Bukin wrote: > I get this with GCC 5.2.0: > > /home/rb743/dev/freebsd-riscv/lib/libdpv/dialog_util.c:270:23: error: > zero-length gnu_printf format string [-Werror=for > mat-zero-length] > sprintf(dargv[n++], ""); > > Ruslan > Fixed just now: https://svnweb.freebsd.org/base?view=revision&revision=294922 Thanks a bunch! -- Cheers,Devin > On Wed, Jan 27, 2016 at 06:21:35AM +0000, Devin Teske wrote: > > Author: dteske > > Date: Wed Jan 27 06:21:35 2016 > > New Revision: 294893 > > URL: https://svnweb.freebsd.org/changeset/base/294893 > > > > Log: > > Fix a crash if `-D' is used without `-t title' > > > > dialog(3)'s dlg_reallocate_gauge(), used both by dialog(3)'s > > dialog_gauge() > > and dialog(1)'s `--gauge', will segmentation fault in strlen(3) > > if no title > > is set for the widget. Reproducible with `dialog --gauge hi 6 20' > > (adding > > `--title ""' is enough to prevent segmentation fault). > > > > MFC after: 3 days > > X-MFC-to: stable/10 > > > > Modified: > > head/lib/libdpv/dialog_util.c > > > > Modified: head/lib/libdpv/dialog_util.c > > =================================================================== > > =========== > > --- head/lib/libdpv/dialog_util.c Wed Jan 27 06:16:53 2016 > > (r294892) > > +++ head/lib/libdpv/dialog_util.c Wed Jan 27 06:21:35 2016 > > (r294893) > > @@ -261,6 +261,13 @@ dialog_spawn_gauge(char *init_prompt, pi > > errx(EXIT_FAILURE, "Out of memory?!"); > > sprintf(dargv[n++], "--title"); > > dargv[n++] = title; > > + } else { > > + if ((dargv[n] = malloc(8)) == NULL) > > + errx(EXIT_FAILURE, "Out of memory?!"); > > + sprintf(dargv[n++], "--title"); > > + if ((dargv[n] = malloc(8)) == NULL) > > + errx(EXIT_FAILURE, "Out of memory?!"); > > + sprintf(dargv[n++], ""); > > } > > if (backtitle != NULL) { > > if ((dargv[n] = malloc(12)) == NULL) > > > >