Skip to content

Commit

Permalink
Fix an out-of-bounds read (found by Coverity)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jalle19 committed Jun 27, 2024
1 parent 25dbfb8 commit 5ea3ee7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ddci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1230,11 +1230,11 @@ int ddci_process_cat(int filter, unsigned char *b, int len, void *opaque) {
caid = b[i + 2] * 256 + b[i + 3];
if (id < MAX_CA_PIDS) {
d->capid[id] = (b[i + 4] & 0x1F) * 256 + b[i + 5];
LOG("CAT pos %d caid %04X, pid %d", id, caid, d->capid[id]);
} else {
LOG("MAX_CA_PIDS (%d) reached for adapter %d", MAX_CA_PIDS, d->id);
}

LOG("CAT pos %d caid %04X, pid %d", id, caid, d->capid[id]);
id++;
}

Expand Down

0 comments on commit 5ea3ee7

Please sign in to comment.