if (*max_i > 1024)
return REG_ESPACE;
*max_i *= 2;
- new_items = xrealloc(array, sizeof(*items) * *max_i);
+ new_items = xrealloc(array, sizeof(*array) * *max_i);
if (new_items == NULL)
return REG_ESPACE;
*items = array = new_items;
if (num_neg_classes > 0)
{
l->neg_classes = tre_mem_alloc(ctx->mem,
- (sizeof(l->neg_classes)
+ (sizeof(*l->neg_classes)
* (num_neg_classes + 1)));
if (l->neg_classes == NULL)
{
if (num_neg_classes > 0)
{
l->neg_classes = tre_mem_alloc(ctx->mem,
- (sizeof(l->neg_classes)
+ (sizeof(*l->neg_classes)
* (num_neg_classes + 1)));
if (l->neg_classes == NULL)
{
sizeof(*tag_directions) * (tnfa->num_tags + 1));
}
tnfa->minimal_tags = xcalloc((unsigned)tnfa->num_tags * 2 + 1,
- sizeof(tnfa->minimal_tags));
+ sizeof(*tnfa->minimal_tags));
if (tnfa->minimal_tags == NULL)
ERROR_EXIT(REG_ESPACE);