cellauto->h = (double)cellauto->w * M_PHI;
}
- cellauto->buf = av_mallocz(sizeof(uint8_t) * cellauto->w * cellauto->h);
+ cellauto->buf = av_mallocz_array(sizeof(uint8_t) * cellauto->w, cellauto->h);
if (!cellauto->buf)
return AVERROR(ENOMEM);
/* fill the first row randomly */
int i;
- cellauto->buf = av_mallocz(sizeof(uint8_t) * cellauto->w * cellauto->h);
+ cellauto->buf = av_mallocz_array(sizeof(uint8_t) * cellauto->w, cellauto->h);
if (!cellauto->buf)
return AVERROR(ENOMEM);
if (cellauto->random_seed == -1)