summaryrefslogtreecommitdiffstats
path: root/src/ChangeLog
diff options
context:
space:
mode:
authorMark Wielaard <[email protected]>2016-11-10 18:45:02 +0100
committerMark Wielaard <[email protected]>2016-11-11 13:06:54 +0100
commitd5afff85e22b38949f3e7936231c67de16e180e8 (patch)
treed946290b5242ea880351f8bea3fa54f302ed7cfb /src/ChangeLog
parent09ec02ec7f7e6913d10943148e2a898264345b07 (diff)
ar: Fix GCC7 -Wformat-length issues.
GCC7 adds warnings for snprintf formatting into too small buffers. Fix the two issues pointed out by the new warning. The ar header fields are fixed length containing left-justified strings without zero terminator. snprintf always adds a '\0' char at the end (which we then don't copy into the ar header field) and numbers are decimal strings of fixed 10 chars (-Wformat-length thinks formatting them as size_t might overflow the buffer on 64bit arches). Signed-off-by: Mark Wielaard <[email protected]>
Diffstat (limited to 'src/ChangeLog')
-rw-r--r--src/ChangeLog7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index b2909b65..33147066 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,10 @@
+2016-11-10 Mark Wielaard <[email protected]>
+
+ * ar.c (write_member): Make sure tmpbuf is large enough to contain
+ a starting '/' and ending '\0' char.
+ (do_oper_insert): Likewise.
+ * arlib.c (arlib_finalize): Format tmpbuf as PRId32 decimal.
+
2016-11-02 Mark Wielaard <[email protected]>
* addr2line.c (handle_address): Add fallthrough comment.