This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH 1/4] Fix format-overflow errors
- From: Nick Clifton <nickc at redhat dot com>
- To: Daniel Black <daniel dot black at au1 dot ibm dot com>, binutils at sourceware dot org
- Date: Mon, 27 Feb 2017 12:47:00 +0000
- Subject: Re: [PATCH 1/4] Fix format-overflow errors
- Authentication-results: sourceware.org; auth=none
- References: <1487810145-3339-1-git-send-email-daniel.black@au.ibm.com>
Hi Daniel,
> ../../binutils-gdb/binutils/prdbg.c: In function �pr_array_type�:
> ../../binutils-gdb/binutils/prdbg.c:500:16: error: �sprintf� may write a terminating nul past the end of the destination [-Werror=format-overflow=]
> sprintf (buf, "%ld", (long) vma);
> ^~~~~
> ../../binutils-gdb/binutils/prdbg.c:500:2: note: �sprintf� output between 2 and 21 bytes into a destination of size 20
> sprintf (buf, "%ld", (long) vma);
This has already been fixed by commit: 98a4fc78f9dab76b5ada3551a7bef36db8a3ed05
Cheers
Nick