The incorrect comparison size could cause a corrupted buffer info to be
regarded as valid.
Reported-by: Coverity
Signed-off-by: Imre Deak <imre.deak@nokia.com>
Reviewed-by: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
for (j = 0; j < dst->cnt; j++) {
if (sbinf->buf_id == dst->info[j].buf_id) {
- if (memcmp(sbinf, &dst->info[j], sizeof(sbinf)))
+ if (memcmp(sbinf, &dst->info[j],
+ sizeof(*sbinf)))
dst->info[j].type |= BUF_DESC_CORRUPT;
break;
}