Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(535)

Side by Side Diff: src/core/SkComposeShader.cpp

Issue 1185893007: fix null-pointer deref in SkComposeShader::toString() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkComposeShader.h" 10 #include "SkComposeShader.h"
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 x += n; 191 x += n;
192 count -= n; 192 count -= n;
193 } while (count > 0); 193 } while (count > 0);
194 } 194 }
195 } 195 }
196 196
197 #ifndef SK_IGNORE_TO_STRING 197 #ifndef SK_IGNORE_TO_STRING
198 void SkComposeShader::toString(SkString* str) const { 198 void SkComposeShader::toString(SkString* str) const {
199 str->append("SkComposeShader: ("); 199 str->append("SkComposeShader: (");
200 200
201 str->append("ShaderA: "); 201 str->append("ShaderA: ");
robertphillips 2015/06/16 17:46:13 might as well add guards for fShaderA & fShaderB w
202 fShaderA->toString(str); 202 fShaderA->toString(str);
203 str->append(" ShaderB: "); 203 str->append(" ShaderB: ");
204 fShaderB->toString(str); 204 fShaderB->toString(str);
205 str->append(" Xfermode: "); 205 if (fMode) {
206 fMode->toString(str); 206 str->append(" Xfermode: ");
207 fMode->toString(str);
208 }
207 209
208 this->INHERITED::toString(str); 210 this->INHERITED::toString(str);
209 211
210 str->append(")"); 212 str->append(")");
211 } 213 }
212 #endif 214 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698