PR 5160
* elflink.c (eval_symbol): Remove bufsz variable and use sizeof(symbuf) where necessary.
This commit is contained in:
parent
62f6180c25
commit
4b93929bf9
|
@ -1,3 +1,9 @@
|
||||||
|
2007-10-12 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
PR 5160
|
||||||
|
* elflink.c (eval_symbol): Remove bufsz variable and use
|
||||||
|
sizeof(symbuf) where necessary.
|
||||||
|
|
||||||
2007-10-12 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
|
2007-10-12 M R Swami Reddy <MR.Swami.Reddy@nsc.com>
|
||||||
|
|
||||||
* elf32-cr16.c (elf32_cr16_relax_section): Fix condition check typo.
|
* elf32-cr16.c (elf32_cr16_relax_section): Fix condition check typo.
|
||||||
|
|
|
@ -7389,12 +7389,11 @@ eval_symbol (bfd_vma *result,
|
||||||
size_t locsymcount,
|
size_t locsymcount,
|
||||||
int signed_p)
|
int signed_p)
|
||||||
{
|
{
|
||||||
int len;
|
size_t len;
|
||||||
int symlen;
|
size_t symlen;
|
||||||
bfd_vma a;
|
bfd_vma a;
|
||||||
bfd_vma b;
|
bfd_vma b;
|
||||||
const int bufsz = 4096;
|
char symbuf[4096];
|
||||||
char symbuf[bufsz];
|
|
||||||
const char *sym = *symp;
|
const char *sym = *symp;
|
||||||
const char *symend;
|
const char *symend;
|
||||||
bfd_boolean symbol_is_section = FALSE;
|
bfd_boolean symbol_is_section = FALSE;
|
||||||
|
@ -7402,7 +7401,7 @@ eval_symbol (bfd_vma *result,
|
||||||
len = strlen (sym);
|
len = strlen (sym);
|
||||||
symend = sym + len;
|
symend = sym + len;
|
||||||
|
|
||||||
if (len < 1 || len > bufsz)
|
if (len < 1 || len > sizeof (symbuf))
|
||||||
{
|
{
|
||||||
bfd_set_error (bfd_error_invalid_operation);
|
bfd_set_error (bfd_error_invalid_operation);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -7427,7 +7426,7 @@ eval_symbol (bfd_vma *result,
|
||||||
symlen = strtol (sym, (char **) symp, 10);
|
symlen = strtol (sym, (char **) symp, 10);
|
||||||
sym = *symp + 1; /* Skip the trailing ':'. */
|
sym = *symp + 1; /* Skip the trailing ':'. */
|
||||||
|
|
||||||
if (symend < sym || symlen + 1 > bufsz)
|
if (symend < sym || symlen + 1 > sizeof (symbuf))
|
||||||
{
|
{
|
||||||
bfd_set_error (bfd_error_invalid_operation);
|
bfd_set_error (bfd_error_invalid_operation);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in New Issue