forked from osmocom/wireshark
ups? first add + 1, then multiply.
svn path=/trunk/; revision=50438
This commit is contained in:
parent
bf6b5d74d6
commit
ed4622dc7f
|
@ -5087,7 +5087,7 @@ proto_register_subtree_array(gint *const *indices, const int num_indices)
|
|||
* dissector that registers ett values.)
|
||||
*/
|
||||
if (tree_is_expanded != NULL) {
|
||||
tree_is_expanded = (guint32 *)g_realloc(tree_is_expanded, (((num_tree_types + num_indices)/32) * sizeof(guint32)) + 1);
|
||||
tree_is_expanded = (guint32 *)g_realloc(tree_is_expanded, (1+((num_tree_types + num_indices)/32)) * sizeof(guint32));
|
||||
|
||||
/* set new items to 0 */
|
||||
/* XXX, slow!!! optimize when needed (align 'i' to 32, and set rest of guint32 to 0) */
|
||||
|
|
Loading…
Reference in New Issue