diff options
author | Marek Polacek <mpolacek@redhat.com> | 2011-10-04 05:11:42 -0400 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2011-10-04 05:11:42 -0400 |
commit | 8d1e297a883c35eae53914a1739fdf0bfb590a6e (patch) | |
tree | a2d9e40dac3b4167e63d2e8961cd5e236478fc87 | |
parent | 21b5d4ccaef62f44402cd47fa7f149ba2972196d (diff) | |
download | elfutils-8d1e297a883c35eae53914a1739fdf0bfb590a6e.tar.gz |
readelf.c: Assume the right size of an array
-rw-r--r-- | src/ChangeLog | 4 | ||||
-rw-r--r-- | src/readelf.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 126c7ab7..2334693c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2011-10-04 Marek Polacek <mpolacek@redhat.com> + + * readelf.c (register_info): Assume the right size of an array. + 2011-10-03 Ulrich Drepper <drepper@gmail.com> * nm.c: Recognize option --mark-special. Still recognize --mark-weak diff --git a/src/readelf.c b/src/readelf.c index 4032bd43..69b2abbe 100644 --- a/src/readelf.c +++ b/src/readelf.c @@ -4787,7 +4787,7 @@ register_info (Ebl *ebl, unsigned int regno, const Ebl_Register_Location *loc, bits ?: &ignore, type ?: &ignore); if (n <= 0) { - snprintf (name, sizeof name, "reg%u", loc->regno); + snprintf (name, REGNAMESZ, "reg%u", loc->regno); if (bits != NULL) *bits = loc->bits; if (type != NULL) |