diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2010-01-12 03:54:10 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2010-01-12 03:54:10 +0000 |
commit | 505dfd12fee24c6ddf6578f9e8d61aae8d4394c1 (patch) | |
tree | ec42e54f6fcbbb149b59301856f4b07165d0f963 /lib | |
parent | 99f679d06fc0bbf3801f7d11fb6eb7b96bd9cff1 (diff) | |
download | netpbm-mirror-505dfd12fee24c6ddf6578f9e8d61aae8d4394c1.tar.gz netpbm-mirror-505dfd12fee24c6ddf6578f9e8d61aae8d4394c1.tar.xz netpbm-mirror-505dfd12fee24c6ddf6578f9e8d61aae8d4394c1.zip |
Fix wild pointer in ppmd_fill_drawproc()
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1097 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libppmd.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/libppmd.c b/lib/libppmd.c index 1234d89f..235df40d 100644 --- a/lib/libppmd.c +++ b/lib/libppmd.c @@ -1053,7 +1053,6 @@ ppmd_fill_drawprocp(pixel ** const pixels, const void * const clientdata) { fillobj * fh; - coord * ocp; fh = (fillobj*) clientdata; @@ -1070,8 +1069,6 @@ ppmd_fill_drawprocp(pixel ** const pixels, REALLOCARRAY(fh->coords, fh->size); if (fh->coords == NULL) pm_error("out of memory enlarging a fillhandle"); - - ocp = &(fh->coords[fh->n - 1]); } /* Check for extremum and set the edge number. */ @@ -1081,6 +1078,7 @@ ppmd_fill_drawprocp(pixel ** const pixels, fh->ydir = 0; fh->startydir = 0; } else { + coord * const ocp = &(fh->coords[fh->n - 1]); int const dx = p.x - ocp->point.x; int const dy = p.y - ocp->point.y; |