Skip to content

Commit e505a96

Browse files
lars18thJalle19
authored andcommitted
Don't reject CWs with a failed check
When searching for a valid CW if you don't have any other alternative then accept any. This makes sense when decoding with one CA system that can't be checked using the standard method: initial PUSI packet with a bitstream content of 0x0 0x0 0x1. Sometimes the check fails, but the CW is valid. Therefore, the check will be used now to distinguish between more than one CW. If you have several and one of them passes the check, that's the correct one. But don't assume that one that fails is invalid. This fixes the decoding with some recent CA systems.
1 parent 614403c commit e505a96

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/pmt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ void update_cw(SPMT *pmt) {
738738
break;
739739
}
740740
// if we can verify if the CW is return the latest CW
741-
if (len)
741+
if (len && cw) // but don't reject failed decrypt checks
742742
continue;
743743

744744
int change = 0;

0 commit comments

Comments
 (0)