@@ -64,7 +64,7 @@ extern int dvrioctl2_finish_auto_process(iomanX_iop_file_t *a1, const char *name
6464extern int dvrioctl2_make_menu (iomanX_iop_file_t * a1 , const char * name , int cmd , void * arg , unsigned int arglen , void * buf , unsigned int buflen );
6565extern int dvrioctl2_re_enc_start (iomanX_iop_file_t * a1 , const char * name , int cmd , void * arg , unsigned int arglen , void * buf , unsigned int buflen );
6666extern int dvrioctl2_rec_pictclip (iomanX_iop_file_t * a1 , const char * name , int cmd , void * arg , unsigned int arglen , void * buf , unsigned int buflen );
67- extern int dvrpAuthEnc (u16 );
67+ extern int dvrpAuthEnc (u16 in_word );
6868
6969// The following has been excluded.
7070unsigned char dvrpAuth_tbl [256 ] = {0x00 };
@@ -1109,10 +1109,12 @@ int dvrioctl2_pre_update_a(
11091109 (void )a1 ;
11101110 (void )name ;
11111111 (void )cmd ;
1112- (void )arg ;
1113- (void )arglen ;
11141112 (void )buflen ;
11151113
1114+ // Unofficial: fill in dvrpAuth_tbl if provided by argument
1115+ if (arglen >= sizeof (dvrpAuth_tbl )) {
1116+ memcpy (& dvrpAuth_tbl , arg , sizeof (dvrpAuth_tbl ));
1117+ }
11161118 cmdack .command = 0x2115 ;
11171119 cmdack .input_word_count = 0 ;
11181120 cmdackerr = DvrdrvExecCmdAck (& cmdack );
@@ -1455,9 +1457,9 @@ int dvrioctl2_re_enc_start(
14551457 return 0 ;
14561458}
14571459
1458- int dvrpAuthEnc (u16 a1 )
1460+ int dvrpAuthEnc (u16 in_word )
14591461{
1460- return (u8 )dvrpAuth_tbl [(u8 )a1 ] | ((u8 )dvrpAuth_tbl [a1 >> 8 ] << 8 );
1462+ return (u8 )dvrpAuth_tbl [(u8 )in_word ] | ((u8 )dvrpAuth_tbl [in_word >> 8 ] << 8 );
14611463}
14621464
14631465int dvr_recv_dma (iomanX_iop_file_t * a1 , u8 * buf , int buflen )
0 commit comments