[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-devel
Subject:    Re: GetObject with empty buffer
From:       Uwe Bonnes <bon () elektron ! ikp ! physik ! tu-darmstadt ! de>
Date:       2002-08-29 12:09:49
[Download RAW message or body]

>>>>> "Fabian" == Fabian Cenedese <Cenedese@indel.ch> writes:

...

    Fabian> <MSDN> If the lpvObject parameter is NULL, the function return
    Fabian> value is the number of bytes required to store the information
    Fabian> it writes to the buffer for the specified graphics object.
    Fabian> </MSDN>

    Fabian> But I couldn't find this anywhere, not in the general function
    Fabian> in gdiobj.c nor in the subtypes FONT_GetObject or
    Fabian> BRUSH_GetObject (sure others neither).  As my app uses this
    Fabian> feature Wine tries to memcpy to a NULL pointer and jumps out of
    Fabian> the window... literally :)


FONT_GetObject sure checks:

    if(buffer)
        memcpy( buffer, &lfA, count );
    return count;

BRUSH_GetObject  does not:

    if (count > sizeof(brush->logbrush)) count = sizeof(brush->logbrush);
    memcpy( buffer, &brush->logbrush, count );
    return count;

Someone has to carefully check all subtypes...

Bye
-- 
Uwe Bonnes                bon@elektron.ikp.physik.tu-darmstadt.de

Institut fuer Kernphysik  Schlossgartenstrasse 9  64289 Darmstadt
--------- Tel. 06151 162516 -------- Fax. 06151 164321 ----------

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic