mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-10 06:34:01 +00:00
commong shape: --sanitizer report
null pointer passed as argument 2, which is declared to never be null
This commit is contained in:
parent
c9a083abce
commit
26128807e1
1 changed files with 5 additions and 4 deletions
|
@ -48,10 +48,11 @@ struct ShapeStroke
|
|||
join(src->join)
|
||||
{
|
||||
memcpy(color, src->color, sizeof(color));
|
||||
dashPattern = static_cast<float*>(malloc(sizeof(float) * dashCnt));
|
||||
memcpy(dashPattern, src->dashPattern, sizeof(float) * dashCnt);
|
||||
if (src->fill)
|
||||
fill = src->fill->duplicate();
|
||||
if (dashCnt > 0) {
|
||||
dashPattern = static_cast<float*>(malloc(sizeof(float) * dashCnt));
|
||||
memcpy(dashPattern, src->dashPattern, sizeof(float) * dashCnt);
|
||||
}
|
||||
if (src->fill) fill = src->fill->duplicate();
|
||||
}
|
||||
|
||||
~ShapeStroke()
|
||||
|
|
Loading…
Add table
Reference in a new issue