Version française
Home     About     Download     Resources     Contact us    
Browse thread
Camlimages integer overflows with PNG images
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Anil Madhavapeddy <anil@r...>
Subject: Re: [Caml-list] Camlimages integer overflows with PNG images
On 3 Jul 2009, at 18:28, Richard Jones wrote:

> On Fri, Jul 03, 2009 at 06:19:49PM +0100, Anil Madhavapeddy wrote:
>> Do you have a patch for this at all?  I need to stick it into OpenBSD
>> fairly urgently as we're in release lock.
>
> Yes, I worked up a patch here:
>
>  https://bugzilla.redhat.com/show_bug.cgi?id=509531#c11
>
> Not entirely sure if it is correct and complete though, so if you have
> any suggested changes, please share them.

Should width and height be clamped further to 31-/63- bits in addition  
to the multiplication check?  It's stored in an OCaml int later on,  
and it's pretty unlikely anyone would be working with images that size.

-anil