Blame SOURCES/elfutils-0.168-libasm-truncation.patch

8c60bf
commit 9e977aca87678417184f01d02c92b2ecb15727e3
8c60bf
Author: Mark Wielaard <mark@klomp.org>
8c60bf
Date:   Sun Feb 12 21:51:34 2017 +0100
8c60bf
8c60bf
    libasm: Fix GCC7 one -Wformat-truncation=2 warning.
8c60bf
    
8c60bf
    Make sure that if we have really many labels the tempsym doesn't get
8c60bf
    truncated because it is too small to hold the whole name.
8c60bf
    
8c60bf
    This doesn't enable -Wformat-truncation=2 or fix other "issues" pointed
8c60bf
    out by enabling this warning because there are currently some issues
8c60bf
    with it. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79448
8c60bf
    
8c60bf
    Signed-off-by: Mark Wielaard <mark@klomp.org>
8c60bf
8c60bf
diff --git a/libasm/asm_newsym.c b/libasm/asm_newsym.c
8c60bf
index 332432a..5389166 100644
8c60bf
--- a/libasm/asm_newsym.c
8c60bf
+++ b/libasm/asm_newsym.c
8c60bf
@@ -1,5 +1,5 @@
8c60bf
 /* Define new symbol for current position in given section.
8c60bf
-   Copyright (C) 2002, 2005, 2016 Red Hat, Inc.
8c60bf
+   Copyright (C) 2002, 2005, 2016, 2017 Red Hat, Inc.
8c60bf
    This file is part of elfutils.
8c60bf
    Written by Ulrich Drepper <drepper@redhat.com>, 2002.
8c60bf
 
8c60bf
@@ -44,7 +44,9 @@ AsmSym_t *
8c60bf
 asm_newsym (AsmScn_t *asmscn, const char *name, GElf_Xword size,
8c60bf
 	    int type, int binding)
8c60bf
 {
8c60bf
-#define TEMPSYMLEN 10
8c60bf
+/* We don't really expect labels with many digits, but in theory it could
8c60bf
+   be 10 digits (plus ".L" and a zero terminator).  */
8c60bf
+#define TEMPSYMLEN 13
8c60bf
   char tempsym[TEMPSYMLEN];
8c60bf
   AsmSym_t *result;
8c60bf