Skip to content

Commit

Permalink
Fix ddci_create_eit writing to the psi buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
Catalin Toda committed Nov 15, 2023
1 parent 80578a2 commit 1934b36
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions src/ca.c
Original file line number Diff line number Diff line change
Expand Up @@ -1728,10 +1728,10 @@ static int CIPLUS_APP_LANG_handler(ca_session_t *session, int tag,
// if (data_length)
// hexdump(data, data_length);

uint8_t data_reply_lang[3]; // ISO 639 Part 2
data_reply_lang[0] = 0x65; /* e */
data_reply_lang[1] = 0x6e; /* n */
data_reply_lang[2] = 0x67; /* g */
uint8_t data_reply_lang[3]; // ISO 639 Part 2
data_reply_lang[0] = 0x65; /* e */
data_reply_lang[1] = 0x6e; /* n */
data_reply_lang[2] = 0x67; /* g */

uint8_t data_reply_country[3]; // ISO 3166-1 alpha 3
data_reply_country[0] = 0x55; /* U */
Expand Down Expand Up @@ -2830,7 +2830,8 @@ int dvbca_init_dev(adapter *ad) {
if (opts.enigma && has_ci) {
LOG_AND_RETURN(TABLES_RESULT_OK,
"No CA device detected on adapter %d: enabling "
"already registered CAs");
"already registered CAs",
ad->id);
}
LOG_AND_RETURN(TABLES_RESULT_ERROR_NORETRY,
"No CA device detected on adapter %d: file %s", ad->id,
Expand Down
2 changes: 1 addition & 1 deletion src/ddci.c
Original file line number Diff line number Diff line change
Expand Up @@ -824,7 +824,7 @@ int ddci_add_psi(ddci_device_t *d, uint8_t *dst, int len) {
__FUNCTION__, d->pmt[i].id, pmt->adapter, pmt->pid);

// Add an EIT table for each channel
psi_len = ddci_create_eit(d, pmt->sid, dst + pos, d->pmt[i].ver);
psi_len = ddci_create_eit(d, pmt->sid, psi, d->pmt[i].ver);
pos += buffer_to_ts(dst + pos, len - pos, psi, psi_len, &d->eit_cc, 18);
}
}
Expand Down

0 comments on commit 1934b36

Please sign in to comment.