Permalink
Browse files

ImageBufferCairo: memset the fast-malloced memory to 0.

  • Loading branch information...
1 parent 539f010 commit 847ba8b54d16d1b0eb4935bef28e75be4078916e @zdobersek zdobersek committed Jan 11, 2017
Showing with 1 addition and 0 deletions.
  1. +1 −0 Source/WebCore/platform/graphics/cairo/ImageBufferCairo.cpp
@@ -243,6 +243,7 @@ ImageBuffer::ImageBuffer(const FloatSize& size, float resolutionScale, ColorSpac
{
int stride = cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, m_size.width());
m_data.m_surfaceData = MallocPtr<unsigned char>::malloc(m_size.height() * stride);
+ memset(m_data.m_surfaceData.get(), 0, m_size.height() * stride);
m_data.m_surface = adoptRef(cairo_image_surface_create_for_data(m_data.m_surfaceData.get(), CAIRO_FORMAT_ARGB32, m_size.width(), m_size.height(), stride));
}

0 comments on commit 847ba8b

Please sign in to comment.