diff options
author | Henry Stiles <henry.stiles@artifex.com> | 2011-05-27 13:45:03 -0600 |
---|---|---|
committer | Henry Stiles <henry.stiles@artifex.com> | 2011-05-27 13:45:03 -0600 |
commit | d98ceb81d6d45f4a2bc49b2f28dd16fe94fea601 (patch) | |
tree | 6c8fcea3b186d92cf6cf0bf6e272b1a6e0e2495b /pxl | |
parent | eb0b920bd993d1b03478c9ba4dfc54e995ec7bac (diff) |
Fixes static analyzer discovered logic error.
With an array size of 0, the line dash pattern should not be accessed.
Diffstat (limited to 'pxl')
-rw-r--r-- | pxl/pxgstate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pxl/pxgstate.c b/pxl/pxgstate.c index 516a30ce9..278fc1cba 100644 --- a/pxl/pxgstate.c +++ b/pxl/pxgstate.c @@ -776,7 +776,7 @@ pxSetLineDash(px_args_t *par, px_state_t *pxs) if ( par->pv[2] ) return_error(errorIllegalAttributeCombination); - if ( size > MAX_DASH_ELEMENTS ) + if ( size > MAX_DASH_ELEMENTS || size == 0 ) return_error(errorIllegalArraySize); /* |