Fix issues in bfd/doc/chew.c

Message ID 28aa38cd-4876-d8b2-f239-af62bdb21610@gmx.de
State New
Headers show
Series
  • Fix issues in bfd/doc/chew.c
Related show

Commit Message

Tim Rühsen Oct. 31, 2019, 7:18 p.m.
Hi,

tried to "get warm" with libbfd, found those little buggers.

Regards, Tim

Comments

Nick Clifton Nov. 5, 2019, 4:05 p.m. | #1
Hi Tim,

> tried to "get warm" with libbfd, found those little buggers.


Approved and applied.  Thanks for fixing these bugs.

Cheers
  Nick

Patch

From f5a3fa2a143499424910abf0e2a8027acc6da773 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tim=20R=C3=BChsen?= <tim.ruehsen@gmx.de>
Date: Thu, 31 Oct 2019 19:16:35 +0100
Subject: [PATCH 1/2] [bfd/doc] Fix sizeof operand

* bfd/doc/chew.c (add_to_definition): Fix sizeof operand
---
 bfd/doc/chew.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bfd/doc/chew.c b/bfd/doc/chew.c
index ef5a22c2fa..818f01a7af 100644
--- a/bfd/doc/chew.c
+++ b/bfd/doc/chew.c
@@ -1333,7 +1333,7 @@  add_to_definition (entry, word)
       entry->code_length += 2;
       entry->code =
 	(stinst_type *) realloc ((char *) (entry->code),
-				 entry->code_length * sizeof (word_type));
+				 entry->code_length * sizeof (stinst_type));
     }
   entry->code[entry->code_end] = word;
 
-- 
2.24.0.rc1