Received: from eggs.gnu.org ([2001:4830:134:3::10]:41973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6Zps-0000au-6R for qemu-devel@nongnu.org; Fri, 05 May 2017 05:47:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6Zpp-0006RZ-5b for qemu-devel@nongnu.org; Fri, 05 May 2017 05:47:40 -0400 References: <20170503104441.1349-1-pbonzini@redhat.com> From: Michael Tokarev Message-ID: Date: Fri, 5 May 2017 12:47:34 +0300 MIME-Version: 1.0 In-Reply-To: <20170503104441.1349-1-pbonzini@redhat.com> Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] jazz_led: fix bad snprintf List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org, leon.alrae@imgtec.com 03.05.2017 13:44, Paolo Bonzini wrote: > Detected by GCC 7's -Wformat-truncation. snprintf writes at most > 2 bytes here including the terminating NUL, so the result is > truncated. In addition, the newline at the end is pointless. > Fix the buffer size and the format string. Applied to -trivial, thanks! /mjt