]> sourceware.org Git - annobin.git/commitdiff
Fix scoping bug computing name for debuginfo file
authorNick Clifton <nickc@redhat.com>
Fri, 22 Jun 2018 09:42:51 +0000 (10:42 +0100)
committerNick Clifton <nickc@redhat.com>
Fri, 22 Jun 2018 09:42:51 +0000 (10:42 +0100)
annocheck/annocheck.c

index bec607972e418096b4d09a4c823125e919e7362d..b6b5fce45c6f84f15d75afd235d6cd6fbb6ad747 100644 (file)
@@ -552,11 +552,12 @@ follow_debuglink (eu_checksec_data * data, Dwarf * dwarf)
 
       const char * prefix = "/usr/lib/debug/.build-id/";
       const char * suffix = ".debug";
-      char * debugfile = xmalloc (strlen (prefix)
-                                 + build_id_len * 2
-                                 + strlen (suffix) + 2);
-      char * n = debugfile;
+      char * n;
       unsigned char * d = (unsigned char *) build_id_ptr;
+
+      n = debugfile = xmalloc (strlen (prefix)
+                              + build_id_len * 2
+                              + strlen (suffix) + 2);
       
       n += sprintf (n, "%s%02x/", prefix, *d++);
       build_id_len --;
This page took 0.026241 seconds and 5 git commands to generate.