Any idea in which situation we are trying to access uninitialized pixmap memory? Apart from that, why not. Christophe On Fri, Sep 12, 2014 at 02:20:36PM -0500, Jeremy White wrote: > > Signed-off-by: Jeremy White <jwhite@xxxxxxxxxxxxxxx> > --- > src/dfps.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/src/dfps.c b/src/dfps.c > index 5db34dc..568ba5e 100644 > --- a/src/dfps.c > +++ b/src/dfps.c > @@ -312,6 +312,17 @@ static void dfps_set_screen_pixmap (PixmapPtr pixmap) > pixmap->drawable.pScreen->devPrivate = pixmap; > } > > +static void dfps_clear_pixmap(PixmapPtr pixmap, int w, int h) > +{ > + GCPtr pgc; > + pgc = GetScratchGC(pixmap->drawable.depth, pixmap->drawable.pScreen); > + if (pgc) > + { > + fbFill(&pixmap->drawable, pgc, 0, 0, w, h); > + FreeScratchGC(pgc); > + } > +} > + > static PixmapPtr dfps_create_pixmap (ScreenPtr screen, int w, int h, int depth, unsigned usage) > { > PixmapPtr pixmap; > @@ -324,7 +335,10 @@ static PixmapPtr dfps_create_pixmap (ScreenPtr screen, int w, int h, int depth, > > pixmap = fbCreatePixmap (screen, w, h, depth, usage); > if (pixmap) > + { > + dfps_clear_pixmap(pixmap, w, h); > dfps_set_info(pixmap, info); > + } > else > free(info); > > -- > 1.7.10.4 > > _______________________________________________ > Spice-devel mailing list > Spice-devel@xxxxxxxxxxxxxxxxxxxxx > http://lists.freedesktop.org/mailman/listinfo/spice-devel
Attachment:
pgpsx6EcbU_mA.pgp
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel