* cgen-dis.c (build_dis_hash_table): Fix xmalloc size computation.
authorDavid Edelsohn <dje.gcc@gmail.com>
Mon, 7 Apr 1997 19:45:47 +0000 (19:45 +0000)
committerDavid Edelsohn <dje.gcc@gmail.com>
Mon, 7 Apr 1997 19:45:47 +0000 (19:45 +0000)
opcodes/ChangeLog
opcodes/cgen-dis.c

index 44d482038031ba12cb72c763054c99ca61d5a43f..cd108fc6219829134a24749f665bb08ff1f4aec1 100644 (file)
@@ -1,5 +1,7 @@
 Mon Apr  7 11:45:44 1997  Doug Evans  <dje@canuck.cygnus.com>
 
+       * cgen-dis.c (build_dis_hash_table): Fix xmalloc size computation.
+
        * cgen-opc.c (hash_keyword_name): Improve algorithm.
 
        * disassemble.c (disassembler): Handle m32r.
index 384fe5c311b53e3a3c2fb3682f0c35f3c0ca9da5..9ed8a0a9973110a08fa1ca5f1067b710041ef25f 100644 (file)
@@ -70,7 +70,7 @@ build_dis_hash_table ()
 
   dis_hash_table = (CGEN_INSN_LIST **)
     xmalloc (hash_size * sizeof (CGEN_INSN_LIST *)
-            + count * sizeof (CGEN_INSN_LIST *));
+            + count * sizeof (CGEN_INSN_LIST));
   memset (dis_hash_table, 0,
          hash_size * sizeof (CGEN_INSN_LIST *)
          + count * sizeof (CGEN_INSN_LIST));