[Libdlo] [PATCH] Fix buffer overflow in cmd_stripe24.

Quentin Stafford-Fraser quentin at pobox.com
Sun May 24 11:27:21 PDT 2009


Hello all...

I sent a previous message explaining this patch but it seems to have  
vanished into the ether...  so, my apologies for the rather abrupt  
message with no explanation :-)

Basically:

I managed to get segfaults when using dlo_copy_host_bmp().   This uses  
cmd_stripe24 to draw the raw pixels to the device, and it turns out  
that if you have big bitmaps to draw, this can overflow its buffer  
before it flushes it to the device.  So I've added a couple more  
checks to see whether there's enough space for the pixels that are  
about to be queued up, and flushes the buffer if not.

There may well be better fixes than mine, but this works for now!

All the best,
Quentin



More information about the Libdlo mailing list