[*] Binary protection state of lld2d

  	RELRO          CANARY            NX           PIE          RPATH        RUNPATH      SYMBOLS      
  	No RELRO       No Canary found   NX disabled  No PIE       No RPATH     No RUNPATH   No Symbols




[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402598_00402598.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        13 - memcpy(param_1,local_10,4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402558_00402558.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        8 - memcpy(param_1,local_10,4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_004024f0_004024f0.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        9 - memcpy(param_1,local_10,4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402b40_00402b40.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
        Issue description:
    Truncation errors occur when a primitive is cast to a primitive of a  smaller size and data is lost in the conversion. The value cannot be  trusted and the application will be in an undefined state.

        13 - if (((g_max_op_rate == 0) && (sVar1 = local_38, g_helper != 0)) &&



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402a54_00402a54.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        19 - memcpy(param_1,&local_38,4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402618_00402618.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        20 - __fd = open(pcVar5,0)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402618_00402618.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        28 - iVar3 = fstat(__fd,&sStack_a8)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402798_00402798.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        20 - __fd = open(pcVar5,0)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402798_00402798.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        28 - iVar3 = fstat(__fd,&sStack_a8)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040291c_0040291c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-sprintf-vsprintf
        Issue description:
    A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer.

        7 - sprintf(acStack_90,"%s
    PARAM=%s",g_helper,param_1)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040291c_0040291c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        7 - sprintf(acStack_90,"%s
    PARAM=%s",g_helper,param_1);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402d8c_00402d8c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        10 - memset(auStack_110,0,0x100)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402d8c_00402d8c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        11 - memset(auStack_110,0,0x100)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00403360_00403360.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        25 - memcpy(&local_1c,&g_hwaddr,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402c08_00402c08.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        14 - memset(local_90,0,0x80)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402c08_00402c08.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        15 - memset(local_90,0,0x80)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402c08_00402c08.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        23 - memset(param_1,0,0x10)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00403610_00403610.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        22 - memcpy(param_2,local_10,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_004031c8_004031c8.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        18 - memset(acStack_30,0,0x20)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_004031c8_004031c8.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        19 - strncpy(acStack_30,*(char **)(g_osl + 4),0x10)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_004031c8_004031c8.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        19 - strncpy(acStack_30,*(char **)(g_osl + 4),0x10);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_004031c8_004031c8.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unterminated-string-strncpy
        Issue description:
    If there is no NUL character byte in the first n bytes of the source string, strncpy() and stpncpy() do not NUL-terminate the destination buffer. If the program does not explicitly terminate the destination buffer, this will almost certainly result in information disclosure, and possibly a buffer overflow condition.

        19 - strncpy(acStack_30,*(char **)(g_osl + 4),0x10);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00403094_00403094.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        13 - memset(acStack_30,0,0x20)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00403094_00403094.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        14 - strncpy(acStack_30,*(char **)(g_osl + 4),0x10)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00403094_00403094.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        14 - strncpy(acStack_30,*(char **)(g_osl + 4),0x10);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00403094_00403094.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unterminated-string-strncpy
        Issue description:
    If there is no NUL character byte in the first n bytes of the source string, strncpy() and stpncpy() do not NUL-terminate the destination buffer. If the program does not explicitly terminate the destination buffer, this will almost certainly result in information disclosure, and possibly a buffer overflow condition.

        14 - strncpy(acStack_30,*(char **)(g_osl + 4),0x10);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00403094_00403094.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        19 - memcpy(param_1,auStack_1e,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402ee8_00402ee8.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        18 - builtin_strncpy(local_40,"br0",4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402ee8_00402ee8.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        19 - memset(pcVar2,0,0x20)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402ee8_00402ee8.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        20 - strncpy(pcVar2,__src,0x10)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402ee8_00402ee8.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        20 - strncpy(pcVar2,__src,0x10);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402ee8_00402ee8.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unterminated-string-strncpy
        Issue description:
    If there is no NUL character byte in the first n bytes of the source string, strncpy() and stpncpy() do not NUL-terminate the destination buffer. If the program does not explicitly terminate the destination buffer, this will almost certainly result in information disclosure, and possibly a buffer overflow condition.

        20 - strncpy(pcVar2,__src,0x10);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402ee8_00402ee8.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        31 - memcpy(param_1,auStack_28,4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_init_00404080.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        7 - iVar1 = xmalloc(0xc)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00403444_00403444.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        13 - memset(acStack_38,0,0x20)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00403444_00403444.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        14 - strncpy(acStack_38,param_1,0x10)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00403444_00403444.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        14 - strncpy(acStack_38,param_1,0x10);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00403444_00403444.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unterminated-string-strncpy
        Issue description:
    If there is no NUL character byte in the first n bytes of the source string, strncpy() and stpncpy() do not NUL-terminate the destination buffer. If the program does not explicitly terminate the destination buffer, this will almost certainly result in information disclosure, and possibly a buffer overflow condition.

        14 - strncpy(acStack_38,param_1,0x10);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00403444_00403444.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        31 - memcpy(param_2,auStack_26,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040370c_0040370c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        14 - memcpy(param_1,&DAT_0040d3d8,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040370c_0040370c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        15 - __stream = fopen("/proc/net/dev","r")



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040370c_0040370c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        23 - fgets(&g_buf,0xa0,__stream)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040370c_0040370c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        24 - fgets(&g_buf,0xa0,__stream)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040370c_0040370c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        25 - while (pcVar2 = fgets(&g_buf,0xa0,__stream), iVar4 = ___ctype_b, pcVar2 != (char *)0x0) {



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_set_promisc_00403a40.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        13 - memset(acStack_30,0,0x20)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_set_promisc_00403a40.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        14 - strncpy(acStack_30,(char *)*param_1,0xf)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_set_promisc_00403a40.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        14 - strncpy(acStack_30,(char *)*param_1,0xf);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_set_promisc_00403a40.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unterminated-string-strncpy
        Issue description:
    If there is no NUL character byte in the first n bytes of the source string, strncpy() and stpncpy() do not NUL-terminate the destination buffer. If the program does not explicitly terminate the destination buffer, this will almost certainly result in information disclosure, and possibly a buffer overflow condition.

        14 - strncpy(acStack_30,(char *)*param_1,0xf);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_interface_open_00403b98.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        42 - memset(acStack_3c,0,0x20)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_interface_open_00403b98.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        43 - strncpy(acStack_3c,(char *)param_2,0x10)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_interface_open_00403b98.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        43 - strncpy(acStack_3c,(char *)param_2,0x10);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_interface_open_00403b98.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unterminated-string-strncpy
        Issue description:
    If there is no NUL character byte in the first n bytes of the source string, strncpy() and stpncpy() do not NUL-terminate the destination buffer. If the program does not explicitly terminate the destination buffer, this will almost certainly result in information disclosure, and possibly a buffer overflow condition.

        43 - strncpy(acStack_3c,(char *)param_2,0x10);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040411c_0040411c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        19 - __dest = (char *)xmalloc(sVar1 + 1)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040411c_0040411c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-strcpy-strcat
        Issue description:
    A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer.

        23 - strcpy(__dest,param_1)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040411c_0040411c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        23 - strcpy(__dest,param_1);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/event_add_004051e4.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        10 - piVar1 = (int *)xmalloc(0x14)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040425c_0040425c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        10 - __dest = (char *)xmalloc(sVar1 + 6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040425c_0040425c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        13 - strcpy(__dest,"/etc/")



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040425c_0040425c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        17 - strncpy(__dest_00,param_1,sVar1)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040425c_0040425c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unterminated-string-strncpy
        Issue description:
    If there is no NUL character byte in the first n bytes of the source string, strncpy() and stpncpy() do not NUL-terminate the destination buffer. If the program does not explicitly terminate the destination buffer, this will almost certainly result in information disclosure, and possibly a buffer overflow condition.

        17 - strncpy(__dest_00,param_1,sVar1);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/xmalloc_00405574.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        7 - pvVar1 = malloc(param_1)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/random_uniform_0040539c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-rand-srand
        Issue description:
    The rand() PRNG should not be used in applications intended to be  portable when good randomness is needed. Instead, the use of random()  is recommended.

        9 - iVar1 = rand()



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/random_uniform_0040539c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        9 - iVar1 = rand();   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/die_004054c8.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-format-string-bugs
        Issue description:
    The software uses a function that accepts a format string as an argument, but the format string originates from an external source. This can lead  to buffer overflows, denial of service, or data representation problems.

        16 - vfprintf(_stderr,param_1,&local_res4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/die_004054c8.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-format-string-bugs
        Issue description:
    The software uses a function that accepts a format string as an argument, but the format string originates from an external source. This can lead  to buffer overflows, denial of service, or data representation problems.

        19 - vsyslog(3,param_1,&local_res4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_write_pidfile_00403d8c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        20 - snprintf(acStack_6c,0x50,"/var/run/%s-%.10s.pid",g_Progname,*param_1)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_write_pidfile_00403d8c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        20 - snprintf(acStack_6c,0x50,"/var/run/%s-%.10s.pid",g_Progname,*param_1);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_write_pidfile_00403d8c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        21 - __s = (char *)open(acStack_6c,0)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_write_pidfile_00403d8c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        30 - sVar4 = read((int)__s,unaff_s2,0x10)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_write_pidfile_00403d8c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        30 - sVar4 = read((int)__s,unaff_s2,0x10);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_write_pidfile_00403d8c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        60 - iVar2 = open(unaff_s2,0x301,0x1a4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_write_pidfile_00403d8c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        68 - snprintf(__s,0x10,"%d
    ",_Var3)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_write_pidfile_00403d8c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        68 - snprintf(__s,0x10,"%d
    ",_Var3);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00406238_00406238.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        8 - memcpy(g_re_txbuf,g_txbuf,param_1)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/fmt_base_004055fc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        8 - memcpy((void *)((int)param_1 + 6),param_2,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/fmt_base_004055fc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        13 - memcpy(param_1,__src,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/fmt_base_004055fc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        19 - memcpy((void *)((int)param_1 + 0x18),param_2,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/fmt_base_004055fc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        20 - memcpy((void *)((int)param_1 + 0x12),param_3,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/packetio_tx_hello_00406724.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        30 - memcpy(puVar3 + 2,(void *)((int)g_topo_session + 0xe),6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/packetio_tx_hello_00406724.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        31 - memcpy(puVar3 + 8,piVar2 + 5,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/packetio_tx_emitee_00406428.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        8 - memcpy(g_txbuf + 6,param_1 + 2,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/packetio_tx_emitee_00406428.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        9 - memcpy(g_txbuf,param_1 + 8,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/packetio_tx_emitee_00406428.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        15 - memcpy(g_txbuf + 0x18,&g_hwaddr,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/packetio_tx_emitee_00406428.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        16 - memcpy(g_txbuf + 0x12,param_1 + 8,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/packetio_recv_handler_004057cc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        67 - uVar15 = osl_read(param_1,&g_rxbuf,0x800)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/packetio_recv_handler_004057cc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-format-string-bugs
        Issue description:
    The software uses a function that accepts a format string as an argument, but the format string originates from an external source. This can lead  to buffer overflows, denial of service, or data representation problems.

        265 - warn(pcVar17,bVar24,bVar28,bVar31,bVar52)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/packetio_recv_handler_004057cc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        362 - memcpy((void *)((int)piVar40 + 0xe),puVar34 + 10,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/packetio_recv_handler_004057cc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        363 - memcpy(piVar40 + 5,g_ethernet_hdr + 6,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/packetio_recv_handler_004057cc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-format-string-bugs
        Issue description:
    The software uses a function that accepts a format string as an argument, but the format string originates from an external source. This can lead  to buffer overflows, denial of service, or data representation problems.

        402 - warn(pcVar17,g_rcvd_pkt_len,DAT_0042c406,DAT_0042c407,DAT_0042c408)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/packetio_recv_handler_004057cc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
        Issue description:
    Truncation errors occur when a primitive is cast to a primitive of a  smaller size and data is lost in the conversion. The value cannot be  trusted and the application will be in an undefined state.

        643 - cVar22 = *(char *)((int)puVar21 + 0x19)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/state_process_packet_00407298.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        47 - memcpy((void *)((int)piVar5 + 0xe),(void *)(iVar2 + 10),6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/state_process_packet_00407298.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        48 - memcpy(piVar5 + 5,(void *)(g_ethernet_hdr + 6),6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/smT_process_event_0040838c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        187 - memcpy(g_emitbuf,&g_rxbuf,g_rcvd_pkt_len)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/seeslist_dequeue_00408c60.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        9 - memcpy(param_1,(void *)(*g_sees + g_sees[3] * 0x14),0x14)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/seeslist_new_00408d6c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        7 - piVar1 = (int *)xmalloc(param_1 * 0x14 + 0x10)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/seeslist_enqueue_00408b80.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        20 - memcpy(puVar2 + 2,param_2,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/seeslist_enqueue_00408b80.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        22 - memcpy(puVar2 + 8,(void *)((int)g_ethernet_hdr + 6),6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/seeslist_enqueue_00408b80.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        23 - memcpy(puVar2 + 0xe,__src,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_004090f0_004090f0.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        26 - memcpy(param_3 + 2,param_2,0x10)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/smS_process_event_00407678.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
        Issue description:
    Truncation errors occur when a primitive is cast to a primitive of a  smaller size and data is lost in the conversion. The value cannot be  trusted and the application will be in an undefined state.

        45 - cVar2 = *(char *)(param_1[1] + 0x20)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/smS_process_event_00407678.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
        Issue description:
    Truncation errors occur when a primitive is cast to a primitive of a  smaller size and data is lost in the conversion. The value cannot be  trusted and the application will be in an undefined state.

        124 - cVar2 = *(char *)(param_1[1] + 0x20)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/smS_process_event_00407678.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
        Issue description:
    Truncation errors occur when a primitive is cast to a primitive of a  smaller size and data is lost in the conversion. The value cannot be  trusted and the application will be in an undefined state.

        155 - cVar2 = (char)piVar6[8]



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/smS_process_event_00407678.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
        Issue description:
    Truncation errors occur when a primitive is cast to a primitive of a  smaller size and data is lost in the conversion. The value cannot be  trusted and the application will be in an undefined state.

        191 - cVar2 = *(char *)(param_1[1] + 0x20)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        34 - iVar2 = getopt(param_1,param_2,"dt:c:")



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
        Issue description:
    The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.

        83 - g_interface = strdup(param_2[_optind])



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
        Issue description:
    The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.

        86 - pcVar1 = strdup(param_2[_optind + 1])



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        95 - memset(&g_sessions,0,0x1b8)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        100 - memset(&g_rxbuf,0,0x800)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        101 - memset(g_emitbuf,0,0x800)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        102 - memset(g_txbuf,0,0x800)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        103 - memset(g_re_txbuf,0,0x800)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        119 - memcpy(acStack_40,"/www/pic/lld2d.ico",0x13)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        135 - g_icon_path = (char *)xmalloc(sVar3 + 1)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-strcpy-strcat
        Issue description:
    A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer.

        136 - strcpy(g_icon_path,acStack_40)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        136 - strcpy(g_icon_path,acStack_40);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        140 - __stream = fopen(pcVar8,"r")



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        255 - osl_interface_open(g_osl,g_interface,0)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00409188_00409188.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        34 - memcpy(param_3 + 2,param_2,__n)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00409368_00409368.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        26 - memcpy(param_3 + 2,param_2,4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00409258_00409258.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        26 - memcpy(param_3 + 2,param_2,8)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00408f6c_00408f6c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        44 - memcpy(puVar7 + 6,__src,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00408f6c_00408f6c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        49 - memcpy(puVar7 + 2,param_2 + 4,4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_004094a0_004094a0.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        26 - memcpy(param_3 + 2,param_2,0x10)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040972c_0040972c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        47 - memcpy(param_3,(void *)(*param_2 + iVar5),6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/lxmldbc_reatwhite_0040b390.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        12 - (sVar2 = sVar2 - 1, -1 < (int)sVar2 &&



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/lxmldbc_reatwhite_0040b390.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
        Issue description:
    Truncation errors occur when a primitive is cast to a primitive of a  smaller size and data is lost in the conversion. The value cannot be  trusted and the application will be in an undefined state.

        13 - ((((cVar1 = pcVar3[-1], cVar1 == ' ' || (cVar1 == '	')) || (cVar1 == '
    ')) ||



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_004095bc_004095bc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        26 - uVar4 = read(iVar2,param_3 + 2,param_4 - 2)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_004095bc_004095bc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        26 - uVar4 = read(iVar2,param_3 + 2,param_4 - 2);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_004095bc_004095bc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        29 - sVar5 = read(iVar2,param_3,1)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_004095bc_004095bc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        29 - sVar5 = read(iVar2,param_3,1);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040b42c_0040b42c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        19 - snprintf(local_80[0].sa_data,0x6c,"%s",param_1)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040b42c_0040b42c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        19 - snprintf(local_80[0].sa_data,0x6c,"%s",param_1);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040991c_0040991c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        28 - uVar6 = read(param_2[1],param_3 + 2,param_4 - 2)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040991c_0040991c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        28 - uVar6 = read(param_2[1],param_3 + 2,param_4 - 2);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040991c_0040991c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        35 - sVar7 = read(param_2[1],param_3,1)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040991c_0040991c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        35 - sVar7 = read(param_2[1],param_3,1);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040b5ac_0040b5ac.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        19 - read(__fd,auStack_28,0xc)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040b5ac_0040b5ac.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        19 - read(__fd,auStack_28,0xc);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040ba50_0040ba50.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        27 - sVar3 = read(param_1,(void *)(param_2 + uVar4),param_3 - uVar4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/xmldbc_ephp_wb_0040bb84.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        16 - iVar2 = FUN_0040b510(__fd,10,param_2,param_3,sVar1 + 1 & 0xffff)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/xmldbc_get_wb_0040bc58.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        16 - iVar2 = FUN_0040b510(__fd,1,param_2,param_3,sVar1 + 1 & 0xffff)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040b9b0_0040b9b0.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        9 - snprintf(acStack_210,0x1ff,"%s %s",param_3,param_4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040b9b0_0040b9b0.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        9 - snprintf(acStack_210,0x1ff,"%s %s",param_3,param_4);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040b910_0040b910.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        9 - snprintf(acStack_210,0x1ff,"%s %s",param_3,param_4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040b910_0040b910.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        9 - snprintf(acStack_210,0x1ff,"%s %s",param_3,param_4);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00409c58_00409c58.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        13 - __stream = fopen("/proc/net/dev","r")



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00409c58_00409c58.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        23 - strncpy(__dest,g_interface,0xe)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00409c58_00409c58.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        23 - strncpy(__dest,g_interface,0xe);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00409c58_00409c58.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unterminated-string-strncpy
        Issue description:
    If there is no NUL character byte in the first n bytes of the source string, strncpy() and stpncpy() do not NUL-terminate the destination buffer. If the program does not explicitly terminate the destination buffer, this will almost certainly result in information disclosure, and possibly a buffer overflow condition.

        23 - strncpy(__dest,g_interface,0xe);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00409c58_00409c58.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        24 - strcat(__dest,":")



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00409c58_00409c58.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        26 - pcVar2 = fgets(&g_buf,0xa0,__stream)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00409c58_00409c58.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        36 - builtin_strncpy(local_34,"0 0 0 0 0 0",0xc)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040bd2c_0040bd2c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        28 - sVar2 = read(param_1,__s,0x400)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040bd2c_0040bd2c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        28 - sVar2 = read(param_1,__s,0x400);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040bd2c_0040bd2c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        28 - sVar2 = read(param_1,__s,0x400);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040c104_0040c104.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-format-string-bugs
        Issue description:
    The software uses a function that accepts a format string as an argument, but the format string originates from an external source. This can lead  to buffer overflows, denial of service, or data representation problems.

        13 - vsnprintf(acStack_40c,0x400,param_1,&local_res4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040c104_0040c104.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        13 - vsnprintf(acStack_40c,0x400,param_1,&local_res4);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040c104_0040c104.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        13 - vsnprintf(acStack_40c,0x400,param_1,&local_res4);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040c104_0040c104.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-command-injection
        Issue description:
    The software constructs an OS command using externally-influenced input,  but it does not neutralize or incorrectly neutralizes special elements  that could modify the intended OS command.

        14 - system(acStack_40c)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040c104_0040c104.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        14 - system(acStack_40c);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
        Issue description:
    Truncation errors occur when a primitive is cast to a primitive of a  smaller size and data is lost in the conversion. The value cannot be  trusted and the application will be in an undefined state.

        44 - sVar8 = CONCAT11(g_base_hdr[0x10],g_base_hdr[0x11])



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        127 - memcpy((void *)((int)puVar16 + 0x1226),puVar22,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        134 - memcpy(g_txbuf + 0x20,&g_reorder_buffer,4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        195 - memcpy(psVar23 + (uint)uVar14 * 9 + 2,puVar11,8)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        214 - memcpy(g_txbuf,g_base_hdr + 10,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        215 - memcpy(g_txbuf + 6,g_base_hdr + 4,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        216 - memcpy(g_txbuf + 0x16,g_base_hdr + 10,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        217 - memcpy(g_txbuf + 0x1c,g_base_hdr + 4,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        237 - (size_t)(g_txbuf + (g_rcvd_pkt_len - ((int)g_qprb_hdr + 0x1b))))



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-use-of-source-size-in-copy
        Issue description:
    The software uses the size of a source buffer when reading from or writing to a destination buffer, which may cause it to access memory that is outside of the bounds of the buffer.

        237 - (size_t)(g_txbuf + (g_rcvd_pkt_len - ((int)g_qprb_hdr + 0x1b))));   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        247 - memcpy(g_ethernet_hdr,g_base_hdr + 10,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        248 - memcpy(g_ethernet_hdr + 6,g_base_hdr + 4,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        249 - memcpy(g_base_hdr + 4,g_base_hdr + 10,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        250 - memcpy(g_base_hdr + 10,g_ethernet_hdr + 6,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        288 - memcpy(g_txbuf + 0x22,(void *)(iVar15 + 4),uVar17 * 0x12)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040c178_0040c178.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-format-string-bugs
        Issue description:
    The software uses a function that accepts a format string as an argument, but the format string originates from an external source. This can lead  to buffer overflows, denial of service, or data representation problems.

        14 - vsnprintf(acStack_41c,0x400,param_3,&local_resc)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040c178_0040c178.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        14 - vsnprintf(acStack_41c,0x400,param_3,&local_resc);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040c178_0040c178.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        14 - vsnprintf(acStack_41c,0x400,param_3,&local_resc);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040c178_0040c178.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-command-injection
        Issue description:
    The software constructs an OS command using externally-influenced input,  but it does not neutralize or incorrectly neutralizes special elements  that could modify the intended OS command.

        15 - __stream = popen(acStack_41c,"r")



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040c178_0040c178.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        15 - __stream = popen(acStack_41c,"r");   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040c178_0040c178.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        22 - iVar1 = fgetc(__stream)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040c178_0040c178.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-off-by-one
        Issue description:
    The software calculates or uses an incorrect maximum or minimum value that is 1 more, or 1 less, than the correct value.

        30 - if (param_1[sVar2 - 1] == '
    ') {



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040c178_0040c178.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-off-by-one
        Issue description:
    The software calculates or uses an incorrect maximum or minimum value that is 1 more, or 1 less, than the correct value.

        31 - param_1[sVar2 - 1] = ''



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_004024f0_004024f0.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        9 - memcpy(param_1,local_10,4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402558_00402558.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        8 - memcpy(param_1,local_10,4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402598_00402598.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        13 - memcpy(param_1,local_10,4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402618_00402618.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        20 - __fd = open(pcVar5,0)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402618_00402618.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        28 - iVar3 = fstat(__fd,&sStack_a8)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402798_00402798.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        20 - __fd = open(pcVar5,0)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402798_00402798.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        28 - iVar3 = fstat(__fd,&sStack_a8)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040291c_0040291c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-sprintf-vsprintf
        Issue description:
    A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer.

        7 - sprintf(acStack_90,"%s
    PARAM=%s",g_helper,param_1)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040291c_0040291c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        7 - sprintf(acStack_90,"%s
    PARAM=%s",g_helper,param_1);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402a54_00402a54.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        19 - memcpy(param_1,&local_38,4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402b40_00402b40.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
        Issue description:
    Truncation errors occur when a primitive is cast to a primitive of a  smaller size and data is lost in the conversion. The value cannot be  trusted and the application will be in an undefined state.

        13 - if (((g_max_op_rate == 0) && (sVar1 = local_38, g_helper != 0)) &&



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402c08_00402c08.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        14 - memset(local_90,0,0x80)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402c08_00402c08.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        15 - memset(local_90,0,0x80)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402c08_00402c08.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        23 - memset(param_1,0,0x10)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402d8c_00402d8c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        10 - memset(auStack_110,0,0x100)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402d8c_00402d8c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        11 - memset(auStack_110,0,0x100)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402ee8_00402ee8.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        18 - builtin_strncpy(local_40,"br0",4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402ee8_00402ee8.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        19 - memset(pcVar2,0,0x20)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402ee8_00402ee8.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        20 - strncpy(pcVar2,__src,0x10)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402ee8_00402ee8.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        20 - strncpy(pcVar2,__src,0x10);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402ee8_00402ee8.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unterminated-string-strncpy
        Issue description:
    If there is no NUL character byte in the first n bytes of the source string, strncpy() and stpncpy() do not NUL-terminate the destination buffer. If the program does not explicitly terminate the destination buffer, this will almost certainly result in information disclosure, and possibly a buffer overflow condition.

        20 - strncpy(pcVar2,__src,0x10);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00402ee8_00402ee8.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        31 - memcpy(param_1,auStack_28,4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00403094_00403094.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        13 - memset(acStack_30,0,0x20)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00403094_00403094.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        14 - strncpy(acStack_30,*(char **)(g_osl + 4),0x10)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00403094_00403094.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        14 - strncpy(acStack_30,*(char **)(g_osl + 4),0x10);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00403094_00403094.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unterminated-string-strncpy
        Issue description:
    If there is no NUL character byte in the first n bytes of the source string, strncpy() and stpncpy() do not NUL-terminate the destination buffer. If the program does not explicitly terminate the destination buffer, this will almost certainly result in information disclosure, and possibly a buffer overflow condition.

        14 - strncpy(acStack_30,*(char **)(g_osl + 4),0x10);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00403094_00403094.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        19 - memcpy(param_1,auStack_1e,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_004031c8_004031c8.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        18 - memset(acStack_30,0,0x20)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_004031c8_004031c8.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        19 - strncpy(acStack_30,*(char **)(g_osl + 4),0x10)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_004031c8_004031c8.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        19 - strncpy(acStack_30,*(char **)(g_osl + 4),0x10);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_004031c8_004031c8.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unterminated-string-strncpy
        Issue description:
    If there is no NUL character byte in the first n bytes of the source string, strncpy() and stpncpy() do not NUL-terminate the destination buffer. If the program does not explicitly terminate the destination buffer, this will almost certainly result in information disclosure, and possibly a buffer overflow condition.

        19 - strncpy(acStack_30,*(char **)(g_osl + 4),0x10);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00403360_00403360.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        25 - memcpy(&local_1c,&g_hwaddr,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00403444_00403444.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        13 - memset(acStack_38,0,0x20)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00403444_00403444.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        14 - strncpy(acStack_38,param_1,0x10)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00403444_00403444.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        14 - strncpy(acStack_38,param_1,0x10);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00403444_00403444.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unterminated-string-strncpy
        Issue description:
    If there is no NUL character byte in the first n bytes of the source string, strncpy() and stpncpy() do not NUL-terminate the destination buffer. If the program does not explicitly terminate the destination buffer, this will almost certainly result in information disclosure, and possibly a buffer overflow condition.

        14 - strncpy(acStack_38,param_1,0x10);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00403444_00403444.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        31 - memcpy(param_2,auStack_26,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00403610_00403610.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        22 - memcpy(param_2,local_10,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040370c_0040370c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        14 - memcpy(param_1,&DAT_0040d3d8,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040370c_0040370c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        15 - __stream = fopen("/proc/net/dev","r")



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040370c_0040370c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        23 - fgets(&g_buf,0xa0,__stream)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040370c_0040370c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        24 - fgets(&g_buf,0xa0,__stream)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040370c_0040370c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        25 - while (pcVar2 = fgets(&g_buf,0xa0,__stream), iVar4 = ___ctype_b, pcVar2 != (char *)0x0) {



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040411c_0040411c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        19 - __dest = (char *)xmalloc(sVar1 + 1)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040411c_0040411c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-strcpy-strcat
        Issue description:
    A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer.

        23 - strcpy(__dest,param_1)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040411c_0040411c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        23 - strcpy(__dest,param_1);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040425c_0040425c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        10 - __dest = (char *)xmalloc(sVar1 + 6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040425c_0040425c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        13 - strcpy(__dest,"/etc/")



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040425c_0040425c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        17 - strncpy(__dest_00,param_1,sVar1)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040425c_0040425c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unterminated-string-strncpy
        Issue description:
    If there is no NUL character byte in the first n bytes of the source string, strncpy() and stpncpy() do not NUL-terminate the destination buffer. If the program does not explicitly terminate the destination buffer, this will almost certainly result in information disclosure, and possibly a buffer overflow condition.

        17 - strncpy(__dest_00,param_1,sVar1);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00406238_00406238.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        8 - memcpy(g_re_txbuf,g_txbuf,param_1)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00408f6c_00408f6c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        44 - memcpy(puVar7 + 6,__src,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00408f6c_00408f6c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        49 - memcpy(puVar7 + 2,param_2 + 4,4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_004090f0_004090f0.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        26 - memcpy(param_3 + 2,param_2,0x10)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00409188_00409188.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        34 - memcpy(param_3 + 2,param_2,__n)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00409258_00409258.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        26 - memcpy(param_3 + 2,param_2,8)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00409368_00409368.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        26 - memcpy(param_3 + 2,param_2,4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_004094a0_004094a0.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        26 - memcpy(param_3 + 2,param_2,0x10)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_004095bc_004095bc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        26 - uVar4 = read(iVar2,param_3 + 2,param_4 - 2)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_004095bc_004095bc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        26 - uVar4 = read(iVar2,param_3 + 2,param_4 - 2);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_004095bc_004095bc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        29 - sVar5 = read(iVar2,param_3,1)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_004095bc_004095bc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        29 - sVar5 = read(iVar2,param_3,1);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040972c_0040972c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        47 - memcpy(param_3,(void *)(*param_2 + iVar5),6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040991c_0040991c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        28 - uVar6 = read(param_2[1],param_3 + 2,param_4 - 2)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040991c_0040991c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        28 - uVar6 = read(param_2[1],param_3 + 2,param_4 - 2);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040991c_0040991c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        35 - sVar7 = read(param_2[1],param_3,1)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040991c_0040991c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        35 - sVar7 = read(param_2[1],param_3,1);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00409c58_00409c58.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        13 - __stream = fopen("/proc/net/dev","r")



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00409c58_00409c58.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        23 - strncpy(__dest,g_interface,0xe)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00409c58_00409c58.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        23 - strncpy(__dest,g_interface,0xe);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00409c58_00409c58.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unterminated-string-strncpy
        Issue description:
    If there is no NUL character byte in the first n bytes of the source string, strncpy() and stpncpy() do not NUL-terminate the destination buffer. If the program does not explicitly terminate the destination buffer, this will almost certainly result in information disclosure, and possibly a buffer overflow condition.

        23 - strncpy(__dest,g_interface,0xe);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00409c58_00409c58.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        24 - strcat(__dest,":")



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00409c58_00409c58.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        26 - pcVar2 = fgets(&g_buf,0xa0,__stream)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_00409c58_00409c58.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        36 - builtin_strncpy(local_34,"0 0 0 0 0 0",0xc)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040b42c_0040b42c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        19 - snprintf(local_80[0].sa_data,0x6c,"%s",param_1)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040b42c_0040b42c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        19 - snprintf(local_80[0].sa_data,0x6c,"%s",param_1);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040b5ac_0040b5ac.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        19 - read(__fd,auStack_28,0xc)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040b5ac_0040b5ac.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        19 - read(__fd,auStack_28,0xc);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040b910_0040b910.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        9 - snprintf(acStack_210,0x1ff,"%s %s",param_3,param_4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040b910_0040b910.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        9 - snprintf(acStack_210,0x1ff,"%s %s",param_3,param_4);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040b9b0_0040b9b0.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        9 - snprintf(acStack_210,0x1ff,"%s %s",param_3,param_4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040b9b0_0040b9b0.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        9 - snprintf(acStack_210,0x1ff,"%s %s",param_3,param_4);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040ba50_0040ba50.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        27 - sVar3 = read(param_1,(void *)(param_2 + uVar4),param_3 - uVar4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040bd2c_0040bd2c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        28 - sVar2 = read(param_1,__s,0x400)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040bd2c_0040bd2c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        28 - sVar2 = read(param_1,__s,0x400);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040bd2c_0040bd2c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        28 - sVar2 = read(param_1,__s,0x400);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040c104_0040c104.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-format-string-bugs
        Issue description:
    The software uses a function that accepts a format string as an argument, but the format string originates from an external source. This can lead  to buffer overflows, denial of service, or data representation problems.

        13 - vsnprintf(acStack_40c,0x400,param_1,&local_res4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040c104_0040c104.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        13 - vsnprintf(acStack_40c,0x400,param_1,&local_res4);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040c104_0040c104.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        13 - vsnprintf(acStack_40c,0x400,param_1,&local_res4);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040c104_0040c104.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-command-injection
        Issue description:
    The software constructs an OS command using externally-influenced input,  but it does not neutralize or incorrectly neutralizes special elements  that could modify the intended OS command.

        14 - system(acStack_40c)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040c104_0040c104.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        14 - system(acStack_40c);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040c178_0040c178.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-format-string-bugs
        Issue description:
    The software uses a function that accepts a format string as an argument, but the format string originates from an external source. This can lead  to buffer overflows, denial of service, or data representation problems.

        14 - vsnprintf(acStack_41c,0x400,param_3,&local_resc)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040c178_0040c178.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        14 - vsnprintf(acStack_41c,0x400,param_3,&local_resc);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040c178_0040c178.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        14 - vsnprintf(acStack_41c,0x400,param_3,&local_resc);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040c178_0040c178.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-command-injection
        Issue description:
    The software constructs an OS command using externally-influenced input,  but it does not neutralize or incorrectly neutralizes special elements  that could modify the intended OS command.

        15 - __stream = popen(acStack_41c,"r")



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040c178_0040c178.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        15 - __stream = popen(acStack_41c,"r");   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040c178_0040c178.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        22 - iVar1 = fgetc(__stream)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040c178_0040c178.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-off-by-one
        Issue description:
    The software calculates or uses an incorrect maximum or minimum value that is 1 more, or 1 less, than the correct value.

        30 - if (param_1[sVar2 - 1] == '
    ') {



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/FUN_0040c178_0040c178.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-off-by-one
        Issue description:
    The software calculates or uses an incorrect maximum or minimum value that is 1 more, or 1 less, than the correct value.

        31 - param_1[sVar2 - 1] = ''



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/die_004054c8.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-format-string-bugs
        Issue description:
    The software uses a function that accepts a format string as an argument, but the format string originates from an external source. This can lead  to buffer overflows, denial of service, or data representation problems.

        16 - vfprintf(_stderr,param_1,&local_res4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/die_004054c8.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-format-string-bugs
        Issue description:
    The software uses a function that accepts a format string as an argument, but the format string originates from an external source. This can lead  to buffer overflows, denial of service, or data representation problems.

        19 - vsyslog(3,param_1,&local_res4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/event_add_004051e4.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        10 - piVar1 = (int *)xmalloc(0x14)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/fmt_base_004055fc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        8 - memcpy((void *)((int)param_1 + 6),param_2,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/fmt_base_004055fc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        13 - memcpy(param_1,__src,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/fmt_base_004055fc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        19 - memcpy((void *)((int)param_1 + 0x18),param_2,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/fmt_base_004055fc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        20 - memcpy((void *)((int)param_1 + 0x12),param_3,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/lxmldbc_reatwhite_0040b390.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        12 - (sVar2 = sVar2 - 1, -1 < (int)sVar2 &&



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/lxmldbc_reatwhite_0040b390.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
        Issue description:
    Truncation errors occur when a primitive is cast to a primitive of a  smaller size and data is lost in the conversion. The value cannot be  trusted and the application will be in an undefined state.

        13 - ((((cVar1 = pcVar3[-1], cVar1 == ' ' || (cVar1 == '	')) || (cVar1 == '
    ')) ||



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        34 - iVar2 = getopt(param_1,param_2,"dt:c:")



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
        Issue description:
    The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.

        83 - g_interface = strdup(param_2[_optind])



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-malloc
        Issue description:
    The software does not check the return value from a method or function, which can prevent it from detecting unexpected states and conditions.

        86 - pcVar1 = strdup(param_2[_optind + 1])



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        95 - memset(&g_sessions,0,0x1b8)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        100 - memset(&g_rxbuf,0,0x800)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        101 - memset(g_emitbuf,0,0x800)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        102 - memset(g_txbuf,0,0x800)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        103 - memset(g_re_txbuf,0,0x800)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        119 - memcpy(acStack_40,"/www/pic/lld2d.ico",0x13)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        135 - g_icon_path = (char *)xmalloc(sVar3 + 1)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-strcpy-strcat
        Issue description:
    A buffer overflow condition exists when a program attempts to put more data in a buffer than it can hold, or when a program attempts to put data in a memory area outside of the boundaries of a buffer.

        136 - strcpy(g_icon_path,acStack_40)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        136 - strcpy(g_icon_path,acStack_40);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        140 - __stream = fopen(pcVar8,"r")



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/main_00404320.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        255 - osl_interface_open(g_osl,g_interface,0)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_init_00404080.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        7 - iVar1 = xmalloc(0xc)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_interface_open_00403b98.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        42 - memset(acStack_3c,0,0x20)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_interface_open_00403b98.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        43 - strncpy(acStack_3c,(char *)param_2,0x10)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_interface_open_00403b98.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        43 - strncpy(acStack_3c,(char *)param_2,0x10);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_interface_open_00403b98.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unterminated-string-strncpy
        Issue description:
    If there is no NUL character byte in the first n bytes of the source string, strncpy() and stpncpy() do not NUL-terminate the destination buffer. If the program does not explicitly terminate the destination buffer, this will almost certainly result in information disclosure, and possibly a buffer overflow condition.

        43 - strncpy(acStack_3c,(char *)param_2,0x10);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_set_promisc_00403a40.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        13 - memset(acStack_30,0,0x20)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_set_promisc_00403a40.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        14 - strncpy(acStack_30,(char *)*param_1,0xf)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_set_promisc_00403a40.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        14 - strncpy(acStack_30,(char *)*param_1,0xf);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_set_promisc_00403a40.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unterminated-string-strncpy
        Issue description:
    If there is no NUL character byte in the first n bytes of the source string, strncpy() and stpncpy() do not NUL-terminate the destination buffer. If the program does not explicitly terminate the destination buffer, this will almost certainly result in information disclosure, and possibly a buffer overflow condition.

        14 - strncpy(acStack_30,(char *)*param_1,0xf);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_write_pidfile_00403d8c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        20 - snprintf(acStack_6c,0x50,"/var/run/%s-%.10s.pid",g_Progname,*param_1)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_write_pidfile_00403d8c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        20 - snprintf(acStack_6c,0x50,"/var/run/%s-%.10s.pid",g_Progname,*param_1);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_write_pidfile_00403d8c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        21 - __s = (char *)open(acStack_6c,0)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_write_pidfile_00403d8c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        30 - sVar4 = read((int)__s,unaff_s2,0x10)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_write_pidfile_00403d8c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        30 - sVar4 = read((int)__s,unaff_s2,0x10);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_write_pidfile_00403d8c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        60 - iVar2 = open(unaff_s2,0x301,0x1a4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_write_pidfile_00403d8c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        68 - snprintf(__s,0x10,"%d
    ",_Var3)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/osl_write_pidfile_00403d8c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        68 - snprintf(__s,0x10,"%d
    ",_Var3);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/packetio_recv_handler_004057cc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        67 - uVar15 = osl_read(param_1,&g_rxbuf,0x800)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/packetio_recv_handler_004057cc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-format-string-bugs
        Issue description:
    The software uses a function that accepts a format string as an argument, but the format string originates from an external source. This can lead  to buffer overflows, denial of service, or data representation problems.

        265 - warn(pcVar17,bVar24,bVar28,bVar31,bVar52)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/packetio_recv_handler_004057cc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        362 - memcpy((void *)((int)piVar40 + 0xe),puVar34 + 10,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/packetio_recv_handler_004057cc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        363 - memcpy(piVar40 + 5,g_ethernet_hdr + 6,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/packetio_recv_handler_004057cc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-format-string-bugs
        Issue description:
    The software uses a function that accepts a format string as an argument, but the format string originates from an external source. This can lead  to buffer overflows, denial of service, or data representation problems.

        402 - warn(pcVar17,g_rcvd_pkt_len,DAT_0042c406,DAT_0042c407,DAT_0042c408)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/packetio_recv_handler_004057cc.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
        Issue description:
    Truncation errors occur when a primitive is cast to a primitive of a  smaller size and data is lost in the conversion. The value cannot be  trusted and the application will be in an undefined state.

        643 - cVar22 = *(char *)((int)puVar21 + 0x19)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/packetio_tx_emitee_00406428.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        8 - memcpy(g_txbuf + 6,param_1 + 2,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/packetio_tx_emitee_00406428.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        9 - memcpy(g_txbuf,param_1 + 8,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/packetio_tx_emitee_00406428.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        15 - memcpy(g_txbuf + 0x18,&g_hwaddr,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/packetio_tx_emitee_00406428.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        16 - memcpy(g_txbuf + 0x12,param_1 + 8,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/packetio_tx_hello_00406724.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        30 - memcpy(puVar3 + 2,(void *)((int)g_topo_session + 0xe),6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/packetio_tx_hello_00406724.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        31 - memcpy(puVar3 + 8,piVar2 + 5,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
        Issue description:
    Truncation errors occur when a primitive is cast to a primitive of a  smaller size and data is lost in the conversion. The value cannot be  trusted and the application will be in an undefined state.

        44 - sVar8 = CONCAT11(g_base_hdr[0x10],g_base_hdr[0x11])



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        127 - memcpy((void *)((int)puVar16 + 0x1226),puVar22,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        134 - memcpy(g_txbuf + 0x20,&g_reorder_buffer,4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        195 - memcpy(psVar23 + (uint)uVar14 * 9 + 2,puVar11,8)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        214 - memcpy(g_txbuf,g_base_hdr + 10,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        215 - memcpy(g_txbuf + 6,g_base_hdr + 4,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        216 - memcpy(g_txbuf + 0x16,g_base_hdr + 10,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        217 - memcpy(g_txbuf + 0x1c,g_base_hdr + 4,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        237 - (size_t)(g_txbuf + (g_rcvd_pkt_len - ((int)g_qprb_hdr + 0x1b))))



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-use-of-source-size-in-copy
        Issue description:
    The software uses the size of a source buffer when reading from or writing to a destination buffer, which may cause it to access memory that is outside of the bounds of the buffer.

        237 - (size_t)(g_txbuf + (g_rcvd_pkt_len - ((int)g_qprb_hdr + 0x1b))));   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        247 - memcpy(g_ethernet_hdr,g_base_hdr + 10,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        248 - memcpy(g_ethernet_hdr + 6,g_base_hdr + 4,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        249 - memcpy(g_base_hdr + 4,g_base_hdr + 10,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        250 - memcpy(g_base_hdr + 10,g_ethernet_hdr + 6,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/qosrcvpkt_00409f28.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        288 - memcpy(g_txbuf + 0x22,(void *)(iVar15 + 4),uVar17 * 0x12)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/random_uniform_0040539c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-insecure-api-rand-srand
        Issue description:
    The rand() PRNG should not be used in applications intended to be  portable when good randomness is needed. Instead, the use of random()  is recommended.

        9 - iVar1 = rand()



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/random_uniform_0040539c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        9 - iVar1 = rand();   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/seeslist_dequeue_00408c60.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        9 - memcpy(param_1,(void *)(*g_sees + g_sees[3] * 0x14),0x14)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/seeslist_enqueue_00408b80.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        20 - memcpy(puVar2 + 2,param_2,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/seeslist_enqueue_00408b80.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        22 - memcpy(puVar2 + 8,(void *)((int)g_ethernet_hdr + 6),6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/seeslist_enqueue_00408b80.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        23 - memcpy(puVar2 + 0xe,__src,6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/seeslist_new_00408d6c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        7 - piVar1 = (int *)xmalloc(param_1 * 0x14 + 0x10)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/smS_process_event_00407678.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
        Issue description:
    Truncation errors occur when a primitive is cast to a primitive of a  smaller size and data is lost in the conversion. The value cannot be  trusted and the application will be in an undefined state.

        45 - cVar2 = *(char *)(param_1[1] + 0x20)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/smS_process_event_00407678.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
        Issue description:
    Truncation errors occur when a primitive is cast to a primitive of a  smaller size and data is lost in the conversion. The value cannot be  trusted and the application will be in an undefined state.

        124 - cVar2 = *(char *)(param_1[1] + 0x20)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/smS_process_event_00407678.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
        Issue description:
    Truncation errors occur when a primitive is cast to a primitive of a  smaller size and data is lost in the conversion. The value cannot be  trusted and the application will be in an undefined state.

        155 - cVar2 = (char)piVar6[8]



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/smS_process_event_00407678.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-truncation
        Issue description:
    Truncation errors occur when a primitive is cast to a primitive of a  smaller size and data is lost in the conversion. The value cannot be  trusted and the application will be in an undefined state.

        191 - cVar2 = *(char *)(param_1[1] + 0x20)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/smT_process_event_0040838c.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        187 - memcpy(g_emitbuf,&g_rxbuf,g_rcvd_pkt_len)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/state_process_packet_00407298.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        47 - memcpy((void *)((int)piVar5 + 0xe),(void *)(iVar2 + 10),6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/state_process_packet_00407298.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        48 - memcpy(piVar5 + 5,(void *)(g_ethernet_hdr + 6),6)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/xmalloc_00405574.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-interesting-api-calls
        Issue description:
    Locate all calls to interesting and potentially insecure API functions (candidate points). The auditor can backtrace from these candidate points to find pathways allowing access from untrusted input.

        7 - pvVar1 = malloc(param_1)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/xmldbc_ephp_wb_0040bb84.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        16 - iVar2 = FUN_0040b510(__fd,10,param_2,param_3,sVar1 + 1 & 0xffff)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_lld2d/xmldbc_get_wb_0040bc58.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-signed-unsigned-conversion
        Issue description:
    The software uses a signed primitive and performs a cast to an unsigned primitive, or uses an unsigned primitive and performs a cast to a signed primitive, which can produce an unexpected value. When the result of a function is to be used as a size parameter, using negative return values can have unexpected results. Although less frequent an issue, unsigned-to-signed conversion can be  the precursor to buffer underwrite conditions. Buffer underwrites  occur frequently when large unsigned values are cast to signed values,  and then used as indexes into a buffer or for pointer arithmetic.

        16 - iVar2 = FUN_0040b510(__fd,1,param_2,param_3,sVar1 + 1 & 0xffff)