[*] Binary protection state of rndimage

  	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_rndimage/error_exit_004011b4.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.

        15 - vfprintf(_stderr,param_1,&local_res4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/main_0040122c.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.

        65 - iVar10 = getopt(param_1,param_2,"hc:f:p:w:t:D")



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/main_0040122c.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.

        93 - pcVar2 = strdup(pdVar3->d_name)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/main_0040122c.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.

        231 - sprintf(local_38,"%s/%s",puVar1,(&g_font_file)[lVar4 % iVar10])



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/main_0040122c.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.

        231 - sprintf(local_38,"%s/%s",puVar1,(&g_font_file)[lVar4 % iVar10]);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/alloc_image_00403ec0.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 - __size = (uint)param_3 * (uint)param_2 * 3



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/alloc_image_00403ec0.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.

        10 - __s = malloc(__size)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/alloc_image_00403ec0.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-wraparound
        Issue description:
    The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control.

        10 - __s = malloc(__size);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/alloc_image_00403ec0.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 - __s = malloc(__size);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/write_jpeg_00402490.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.

        57 - DAT_0041857c = fopen(param_1,"wb")



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/write_jpeg_00402490.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.

        222 - DAT_00415da4 = malloc(0xffff)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/write_jpeg_00402490.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.

        222 - DAT_00415da4 = malloc(0xffff);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/write_jpeg_00402490.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.

        227 - DAT_00415dac = malloc(0x3fffc)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/write_jpeg_00402490.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.

        227 - DAT_00415dac = malloc(0x3fffc);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/write_jpeg_00402490.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.

        302 - memcpy(&local_68,&DAT_00404ee0,0x40)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/get_chr_from_file_00403f70.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.

        33 - (__ptr = (char *)malloc(10), __ptr == (char *)0x0)) {



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/get_chr_from_file_00403f70.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.

        33 - (__ptr = (char *)malloc(10), __ptr == (char *)0x0)) {   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/get_chr_from_file_00403f70.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.

        33 - (__ptr = (char *)malloc(10), __ptr == (char *)0x0)) {   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/get_chr_from_file_00403f70.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.

        39 - __stream = fopen(param_1,"rb")



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/get_chr_from_file_00403f70.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.

        40 - if (((((__stream == (FILE *)0x0) || (sVar5 = fread(__ptr,10,1,__stream), sVar5 == 0)) ||



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/get_chr_from_file_00403f70.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.

        40 - if (((((__stream == (FILE *)0x0) || (sVar5 = fread(__ptr,10,1,__stream), sVar5 == 0)) ||   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/get_chr_from_file_00403f70.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.

        40 - if (((((__stream == (FILE *)0x0) || (sVar5 = fread(__ptr,10,1,__stream), sVar5 == 0)) ||   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/get_chr_from_file_00403f70.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-wraparound
        Issue description:
    The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control.

        44 - __ptr = (char *)realloc(__ptr,uVar4 + 9)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/get_chr_from_file_00403f70.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.

        44 - __ptr = (char *)realloc(__ptr,uVar4 + 9);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/get_chr_from_file_00403f70.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.

        54 - sVar5 = fread(__ptr,uVar4 + 9,1,__stream)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/get_chr_from_file_00403f70.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.

        54 - sVar5 = fread(__ptr,uVar4 + 9,1,__stream);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/get_chr_from_file_00403f70.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.

        75 - uVar8 = fgetc(__stream)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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 - memcpy(acStack_bc,"ABCDEFGHIJKLMNOPQRSTUVWXYZ",0x1b)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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 - mkdir("/var/auth",0x1ff)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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 - mkdir("/var/auth/auth_img",0x1ff)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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 - pFVar1 = fopen("/var/auth/user.idx","r+")



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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 - pFVar1 = fopen("/var/auth/user.idx","w")



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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 - fscanf(pFVar1,"%d",&local_c0)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-scanf
        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.

        26 - fscanf(pFVar1,"%d",&local_c0);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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.

        32 - sprintf(acStack_a0,"%02d",local_c0)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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.

        37 - sprintf(&DAT_004154b8,"/var/auth/auth_img/a%d.jpeg",local_c0)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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.

        38 - unlink(&DAT_004154b8)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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(&DAT_00415438,0,0x80)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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.

        47 - sprintf(&DAT_00415438,"%s%c",&DAT_00415438,(int)acStack_bc[uVar3 % 0x1a])



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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.

        47 - sprintf(&DAT_00415438,"%s%c",&DAT_00415438,(int)acStack_bc[uVar3 % 0x1a]);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-overlapping-source-destination
        Issue description:
    C standards specify that the results are undefined if a call to copy functions, with the exception of memmove(), would cause copying to take place between objects that overlap (e.g., if the target string array and one of the supplied input arguments refer to the same buffer).

        47 - sprintf(&DAT_00415438,"%s%c",&DAT_00415438,(int)acStack_bc[uVar3 % 0x1a]);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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.

        51 - sprintf(acStack_a0,"%s%s.msg","/var/auth/",pcVar4 + 1)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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.

        51 - sprintf(acStack_a0,"%s%s.msg","/var/auth/",pcVar4 + 1);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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.

        52 - pFVar1 = fopen(acStack_a0,"w")



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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 - memcpy(acStack_bc,"ABCDEFGHIJKLMNOPQRSTUVWXYZ",0x1b)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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 - mkdir("/var/auth",0x1ff)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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 - mkdir("/var/auth/auth_img",0x1ff)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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 - pFVar1 = fopen("/var/auth/user.idx","r+")



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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 - pFVar1 = fopen("/var/auth/user.idx","w")



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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 - fscanf(pFVar1,"%d",&local_c0)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-unchecked-ret-scanf
        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.

        26 - fscanf(pFVar1,"%d",&local_c0);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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.

        32 - sprintf(acStack_a0,"%02d",local_c0)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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.

        37 - sprintf(&DAT_004154b8,"/var/auth/auth_img/a%d.jpeg",local_c0)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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.

        38 - unlink(&DAT_004154b8)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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(&DAT_00415438,0,0x80)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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.

        47 - sprintf(&DAT_00415438,"%s%c",&DAT_00415438,(int)acStack_bc[uVar3 % 0x1a])



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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.

        47 - sprintf(&DAT_00415438,"%s%c",&DAT_00415438,(int)acStack_bc[uVar3 % 0x1a]);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-overlapping-source-destination
        Issue description:
    C standards specify that the results are undefined if a call to copy functions, with the exception of memmove(), would cause copying to take place between objects that overlap (e.g., if the target string array and one of the supplied input arguments refer to the same buffer).

        47 - sprintf(&DAT_00415438,"%s%c",&DAT_00415438,(int)acStack_bc[uVar3 % 0x1a]);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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.

        51 - sprintf(acStack_a0,"%s%s.msg","/var/auth/",pcVar4 + 1)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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.

        51 - sprintf(acStack_a0,"%s%s.msg","/var/auth/",pcVar4 + 1);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/FUN_00400e78_00400e78.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.

        52 - pFVar1 = fopen(acStack_a0,"w")



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/alloc_image_00403ec0.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 - __size = (uint)param_3 * (uint)param_2 * 3



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/alloc_image_00403ec0.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.

        10 - __s = malloc(__size)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/alloc_image_00403ec0.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-wraparound
        Issue description:
    The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control.

        10 - __s = malloc(__size);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/alloc_image_00403ec0.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 - __s = malloc(__size);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/error_exit_004011b4.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.

        15 - vfprintf(_stderr,param_1,&local_res4)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/get_chr_from_file_00403f70.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.

        33 - (__ptr = (char *)malloc(10), __ptr == (char *)0x0)) {



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/get_chr_from_file_00403f70.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.

        33 - (__ptr = (char *)malloc(10), __ptr == (char *)0x0)) {   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/get_chr_from_file_00403f70.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.

        33 - (__ptr = (char *)malloc(10), __ptr == (char *)0x0)) {   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/get_chr_from_file_00403f70.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.

        39 - __stream = fopen(param_1,"rb")



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/get_chr_from_file_00403f70.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.

        40 - if (((((__stream == (FILE *)0x0) || (sVar5 = fread(__ptr,10,1,__stream), sVar5 == 0)) ||



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/get_chr_from_file_00403f70.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.

        40 - if (((((__stream == (FILE *)0x0) || (sVar5 = fread(__ptr,10,1,__stream), sVar5 == 0)) ||   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/get_chr_from_file_00403f70.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.

        40 - if (((((__stream == (FILE *)0x0) || (sVar5 = fread(__ptr,10,1,__stream), sVar5 == 0)) ||   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/get_chr_from_file_00403f70.c


        Semgrep rule: external.semgrep-rules-0xdea.rules.c.raptor-integer-wraparound
        Issue description:
    The software performs a calculation that can produce an integer overflow or wraparound, when the logic assumes that the resulting value will always be larger than the original value. This can introduce other weaknesses when the calculation is used for resource management or execution control.

        44 - __ptr = (char *)realloc(__ptr,uVar4 + 9)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/get_chr_from_file_00403f70.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.

        44 - __ptr = (char *)realloc(__ptr,uVar4 + 9);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/get_chr_from_file_00403f70.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.

        54 - sVar5 = fread(__ptr,uVar4 + 9,1,__stream)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/get_chr_from_file_00403f70.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.

        54 - sVar5 = fread(__ptr,uVar4 + 9,1,__stream);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/get_chr_from_file_00403f70.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.

        75 - uVar8 = fgetc(__stream)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/main_0040122c.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.

        65 - iVar10 = getopt(param_1,param_2,"hc:f:p:w:t:D")



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/main_0040122c.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.

        93 - pcVar2 = strdup(pdVar3->d_name)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/main_0040122c.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.

        231 - sprintf(local_38,"%s/%s",puVar1,(&g_font_file)[lVar4 % iVar10])



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/main_0040122c.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.

        231 - sprintf(local_38,"%s/%s",puVar1,(&g_font_file)[lVar4 % iVar10]);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/write_jpeg_00402490.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.

        57 - DAT_0041857c = fopen(param_1,"wb")



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/write_jpeg_00402490.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.

        222 - DAT_00415da4 = malloc(0xffff)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/write_jpeg_00402490.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.

        222 - DAT_00415da4 = malloc(0xffff);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/write_jpeg_00402490.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.

        227 - DAT_00415dac = malloc(0x3fffc)



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/write_jpeg_00402490.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.

        227 - DAT_00415dac = malloc(0x3fffc);   //possible issue identified - semgrep



[+] Identified source function: /logs/s16_ghidra_decompile_checks/haruspex_rndimage/write_jpeg_00402490.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.

        302 - memcpy(&local_68,&DAT_00404ee0,0x40)