* src/muscle-tab.c (muscle_insert, muscle_grow)
* src/state.c (state_hash_insert): Check the return value of
hash_insert.
+2009-06-11 Akim Demaille <demaille@gostai.com>
+
+ hash: check insertion for memory exhaustion.
+ * src/muscle-tab.c (muscle_insert, muscle_grow)
+ * src/state.c (state_hash_insert): Check the return value of
+ hash_insert.
+
2009-06-10 Akim Demaille <demaille@gostai.com>
gnulib: update.
/* First insertion in the hash. */
entry = xmalloc (sizeof *entry);
entry->key = key;
- hash_insert (muscle_table, entry);
+ if (!hash_insert (muscle_table, entry))
+ xalloc_die ();
}
else
free (entry->storage);
/* First insertion in the hash. */
entry = xmalloc (sizeof *entry);
entry->key = key;
- hash_insert (muscle_table, entry);
+ if (!hash_insert (muscle_table, entry))
+ xalloc_die ();
entry->value = entry->storage = xstrdup (val);
}
else
void
state_hash_insert (state *s)
{
- hash_insert (state_table, s);
+ if (!hash_insert (state_table, s))
+ xalloc_die ();
}