undefined4
APPeerAuthSanity(undefined4 param_1,int param_2,undefined4 param_3,void *param_4,void *param_5,
short *param_6,short *param_7,void *param_8,void *param_9)
{
char *pcVar1;
short sVar2;
memcpy(param_4,(void *)(param_2 + 4),6) //possible issue identified - semgrep
memcpy(param_5,(void *)(param_2 + 10),6) //possible issue identified - semgrep
memmove(param_6,(void *)(param_2 + 0x18),2) //possible issue identified - semgrep
memmove(param_7,(void *)(param_2 + 0x1a),2) //possible issue identified - semgrep
memmove(param_8,(void *)(param_2 + 0x1c),2) //possible issue identified - semgrep
sVar2 = *param_6;
if (sVar2 == 0) {
sVar2 = *param_7;
if ((ushort)(sVar2 - 1U) < 2) {
return 1;
}
if (RTDebugLevel < 3) {
return 0;
}
pcVar1 = "APPeerAuthSanity fail - wrong Seg# (=%d)\n";
}
else if (sVar2 == 1) {
sVar2 = *param_7;
if (sVar2 == 1) {
return 1;
}
if (sVar2 == 4) {
return 1;
}
if ((ushort)(sVar2 - 2U) < 2) {
memmove(param_9,(void *)(param_2 + 0x20),0x80) //possible issue identified - semgrep
return 1;
}
if (RTDebugLevel < 3) {
return 0;
}
pcVar1 = "APPeerAuthSanity fail - wrong Seg# (=%d)\n";
}
else {
if (RTDebugLevel < 3) {
return 0;
}
pcVar1 = "APPeerAuthSanity fail - wrong algorithm (=%d)\n";
}
printk(pcVar1,sVar2);
return 0;
}