Skip to content

Compilation error: Making pointer from integer without a cast #6

@plazer1

Description

@plazer1

In the funciton injector defined in src/audio_bitstream.c, there are 2 occurrences of making a pointer from integer without a cast, which is causing the compilation to fail:

        unsigned char* adr = (((unsigned int)vm_get_sym_entry)&(0xFF000000)) + i;
//      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        int j = 0;
        for(; j < magic_len; ++j)
            if(adr[j] != PCM_Open_magic[j])
                break;

        if(j == magic_len){
            PCM_Open = (((unsigned int)adr)|1);
//          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            break;
        }

This problem is solved by adding the casts to unsigned char* and PCM_Open_t respectively.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions