Bug 679618 - Uninitialized memory in gfx/2d/SourceSurfaceCG.cpp; r=jmuizelaar
authorAtul Aggarwal <atulagrwl@gmail.com>
Wed, 31 Aug 2011 13:16:12 +0100
changeset 76320 5565603c0b7dcddbfe925625bf90ae708c247506
parent 76266 7a8b51e5be412ea0ac1662ed36b53ca4ee939f73
child 76321 3ef046cd262245dacde049b8434345f715f964c1
push id21097
push userbmo@edmorley.co.uk
push dateThu, 01 Sep 2011 07:45:07 +0000
treeherdermozilla-central@7d3d1c2c75f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmuizelaar
bugs679618
milestone9.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 679618 - Uninitialized memory in gfx/2d/SourceSurfaceCG.cpp; r=jmuizelaar
gfx/2d/SourceSurfaceCG.cpp
--- a/gfx/2d/SourceSurfaceCG.cpp
+++ b/gfx/2d/SourceSurfaceCG.cpp
@@ -105,17 +105,17 @@ SourceSurfaceCG::InitFromData(unsigned c
 
     case A8:
       // XXX: why don't we set a colorspace here?
       bitsPerComponent = 8;
       bitsPerPixel = 8;
   };
 
   void *data = malloc(aStride * aSize.height);
-  memcpy(aData, data, aStride * aSize.height);
+  memcpy(data, aData, aStride * aSize.height);
 
   mFormat = aFormat;
 
   dataProvider = CGDataProviderCreateWithData (data,
                                                data,
 					       aSize.height * aStride,
 					       releaseCallback);