0

When I click on cat.jpg I get the correct image and my server returns "HTTP/1.1 200 OK" Check50 gives me an error, though. When I step through the program in gdb and print *content just before returning from the function, I get

$7 = (BYTE *) 0x6084d0 "\377\330\377", <incomplete sequence \340>

The same does not happen with cat.html and check50 tells me that is ok. This is my code:

bool load(FILE* file, BYTE** content, size_t* length)
{
    *length = 0;
    *content = NULL;
    if(fseek(file, 0, SEEK_END) == 0)
    {
        fseek(file, 0, SEEK_END);
        *length = ftell(file);
        BYTE* info = malloc(*length);

        fseek(file, 0, SEEK_SET);
        fread(info, 1, *length,file);
        *content = info;
        return true;
    }
    //return false;
    return false;
}

I can't find anything useful about "incomplete sequence".

0

The problem occurred because of a typo in lookup. I returned image/jpg rather than image/jpeg. This was not caught in the first check50.

I still get "incomplete sequence" but it passes check50. I still have other problems with the code, but I don't think they are related to this.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .