projects
/
platform
/
core
/
graphics
/
tizenvg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef1e934
)
common shape: fix memory access violation
author
Hermet Park
<chuneon.park@samsung.com>
Thu, 18 Nov 2021 02:31:15 +0000
(11:31 +0900)
committer
JunsuChoi
<jsuya.choi@samsung.com>
Fri, 19 Nov 2021 05:27:38 +0000
(14:27 +0900)
asan report:
../src/lib/tvgShapeImpl.h:94:15: runtime error: null pointer passed as argument 2, which is declared to never be null
../src/lib/tvgShapeImpl.h:101:15: runtime error: null pointer passed as argument 2, which is declared to never be null
src/lib/tvgShapeImpl.h
patch
|
blob
|
history
diff --git
a/src/lib/tvgShapeImpl.h
b/src/lib/tvgShapeImpl.h
index
c887f04
..
32aa00a
100644
(file)
--- a/
src/lib/tvgShapeImpl.h
+++ b/
src/lib/tvgShapeImpl.h
@@
-84,6
+84,8
@@
struct ShapePath
void duplicate(const ShapePath* src)
{
+ if (src->cmdCnt == 0 || src->ptsCnt == 0) return;
+
cmdCnt = src->cmdCnt;
reservedCmdCnt = src->reservedCmdCnt;
ptsCnt = src->ptsCnt;