2009-08-21 16:18:45 +02:00
|
|
|
--- src/addr2line.c-dist 2008-12-05 08:42:12.000000000 +0100
|
|
|
|
+++ src/addr2line.c 2008-12-05 08:45:22.000000000 +0100
|
|
|
|
@@ -373,8 +373,8 @@ handle_address (const char *string, Dwfl
|
2009-02-19 18:07:55 +01:00
|
|
|
{
|
|
|
|
bool parsed = false;
|
|
|
|
int n;
|
|
|
|
- char *name = NULL;
|
|
|
|
- if (sscanf (string, "(%m[^)])%" PRIiMAX "%n", &name, &addr, &n) == 2
|
|
|
|
+ char name[4096]; /* FIXME */
|
|
|
|
+ if (sscanf (string, "(%[^)])%" PRIiMAX "%n", name, &addr, &n) == 2
|
|
|
|
&& string[n] == '\0')
|
2009-08-21 16:18:45 +02:00
|
|
|
{
|
|
|
|
/* It was (section)+offset. This makes sense if there is
|
|
|
|
@@ -415,7 +415,7 @@ handle_address (const char *string, Dwfl
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2009-02-19 18:07:55 +01:00
|
|
|
- else if (sscanf (string, "%m[^-+]%" PRIiMAX "%n", &name, &addr, &n) == 2
|
2009-08-21 16:18:45 +02:00
|
|
|
+ else if (sscanf (string, "%[^-+]%" PRIiMAX "%n", name, &addr, &n) == 2
|
2009-02-19 18:07:55 +01:00
|
|
|
&& string[n] == '\0')
|
|
|
|
{
|
|
|
|
/* It was symbol+offset. */
|
2009-08-21 16:18:45 +02:00
|
|
|
@@ -436,7 +436,6 @@ handle_address (const char *string, Dwfl
|
2009-02-19 18:07:55 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
- free (name);
|
|
|
|
if (!parsed)
|
|
|
|
return 1;
|
|
|
|
}
|