Skip to content

Commit b4d60f8

Browse files
tdennistonSkia Commit-Bot
authored andcommitted
Fix use of uninitialized value in SkSVGDevice
The asAGradient() function appears to be deprecated (https://crbug.com/skia/8941) but there's no easy way to remove its use here at the moment. So, fixing the surface-level issue. Bug: oss-fuzz:23932 Change-Id: Ia9675f3b31644f2754421f27844e77c43f189c90 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300907 Reviewed-by: Florin Malita <[email protected]> Auto-Submit: Tyler Denniston <[email protected]> Commit-Queue: Tyler Denniston <[email protected]>
1 parent 01d8ad6 commit b4d60f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/svg/SkSVGDevice.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ void SkSVGDevice::AutoElement::addGradientShaderResources(const SkShader* shader
401401
const SkPaint& paint,
402402
Resources* resources) {
403403
SkShader::GradientInfo grInfo;
404-
grInfo.fColorCount = 0;
404+
memset(&grInfo, 0, sizeof(grInfo));
405405
if (SkShader::kLinear_GradientType != shader->asAGradient(&grInfo)) {
406406
// TODO: non-linear gradient support
407407
return;

0 commit comments

Comments
 (0)