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

Steve (Endurance) srevill at endurancetech.co.uk
Sun May 24 12:20:22 PDT 2009


On 24 May, Quentin Stafford-Fraser <quentin at pobox.com> wrote:
> 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!

Your fix looks sensible to me.

Thanks,

Steve

-- 
Stephen Revill, Technical Project Leader           Tel: +44 (0) 1353 740 267
Endurance Technology Ltd                           Fax: +44 (0) 87 1251 7002 
5 Marine Drive West, Bognor Regis,           http://www.endurancetech.co.uk/
West Sussex, PO21 2QA, UK                 Registered in England No. 04372566
                                         VAT Registration No. GB 794 5274 86

This e-mail and any attachments may contain informtion which is confidential,
proprietary, privileged or otherwise protected by law. The information is
solely intended for the named addressee (or a person responsible for
delivering it to the addressee). If you are not the intended recipient of
this message, you are not authorized to read, print, retain, copy or
disseminate this message or any part of it. If you have received this e-mail
in error, please notify the sender immediately by return e-mail and delete it
from your computer. 


More information about the Libdlo mailing list