GNOME Bugzilla – Bug 668050
theme-node-drawing: don't crash if st_theme_node_paint() is called on an empty area
Last modified: 2012-08-19 04:49:36 UTC
See: https://bugzilla.redhat.com/show_bug.cgi?id=748293
Created attachment 205400 [details] [review] theme-node-drawing: don't crash if st_theme_node_paint() is called on an empty area When st_theme_node_paint() was called with zero width or height and a theme node with a shadow, we'd crash because we'd fail to allocate a texture with an empty size, then unreference the NULL pointer.
Review of attachment 205400 [details] [review]: LGTM
Review of attachment 205400 [details] [review]: ::: src/st/st-theme-node-drawing.c @@ +1413,3 @@ CoglHandle buffer, offscreen; + int texture_width = ceil (width); + int texture_height = ceil (height); You don't mention this part in your commit message. Seems to be an independent change?
(In reply to comment #3) > Review of attachment 205400 [details] [review]: > > ::: src/st/st-theme-node-drawing.c > @@ +1413,3 @@ > CoglHandle buffer, offscreen; > + int texture_width = ceil (width); > + int texture_height = ceil (height); > > You don't mention this part in your commit message. Seems to be an independent > change? Not really an independent fix - what the patch is doing is making sure that the texture is at least 1,1 - so we make sure width/height are > 0 and then round up. yes, I suppose this is also fixing a bug in terms of misdrawing shadowed actors with non-integral allocations, but I don't think that's going to be very visible at least with a larger blur. Pushed the change as is (didn't actually see the above comment until after I pushed)
Review of attachment 205400 [details] [review]: (marking patch committed to get it off the patch list)
If this has been committed, shouldn't this report be closed?
Yes, we should.