Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 131730
b: refs/heads/master
c: 7199e52
h: refs/heads/master
v: v3
  • Loading branch information
Henrik Kurelid authored and Stefan Richter committed Feb 24, 2009
1 parent d9783a2 commit 8b4acd5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 096edfbf167ab277608d26ba8b7978da116a4996
refs/heads/master: 7199e523ef71d24cd8030ea454fca00bb52d58f0
20 changes: 13 additions & 7 deletions trunk/drivers/media/dvb/firesat/firesat-ci.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,20 @@ static int firesat_ca_pmt(struct firesat *firesat, void *arg)
{
struct ca_msg *msg = arg;
int data_pos;
int data_length;
int i;

data_pos = 4;
if (msg->msg[3] & 0x80) {
data_length = 0;
for (i = 0; i < (msg->msg[3] & 0x7F); i++)
data_length = (data_length << 8) + msg->msg[data_pos++];
} else {
data_length = msg->msg[3];
}

if (msg->msg[3] & 0x80)
data_pos = (msg->msg[4] && 0x7F) + 4;
else
data_pos = 4;

return avc_ca_pmt(firesat, &msg->msg[data_pos],
msg->length - data_pos) ? -EFAULT : 0;
return avc_ca_pmt(firesat, &msg->msg[data_pos], data_length) ?
-EFAULT : 0;
}

static int firesat_ca_send_msg(struct firesat *firesat, void *arg)
Expand Down

0 comments on commit 8b4acd5

Please sign in to comment.