summaryrefslogtreecommitdiff
path: root/psi/zfsample.c
diff options
context:
space:
mode:
authorKen Sharp <ken.sharp@artifex.com>2016-04-22 11:54:44 +0100
committerKen Sharp <ken.sharp@artifex.com>2016-04-22 11:54:44 +0100
commitcaf54da6fe8635a17f069e947ff87d0b6c37a592 (patch)
tree60e47f25307954e1240c476e1038294d38461774 /psi/zfsample.c
parent58db0de140dc12170d4fb4b33d32a90f5d57f0e2 (diff)
downloadghostpdl-caf54da6fe8635a17f069e947ff87d0b6c37a592.tar.gz
Coverity ID 94789 - missing parentheses could cause error
This appears to be a genuine bug, even if the parameters were valid we would jump to the failure condition. Seems we do not have a test case for this code path.
Diffstat (limited to 'psi/zfsample.c')
-rw-r--r--psi/zfsample.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/psi/zfsample.c b/psi/zfsample.c
index d2aeeed47..fde566396 100644
--- a/psi/zfsample.c
+++ b/psi/zfsample.c
@@ -332,9 +332,10 @@ cube_build_func0(const ref * pdict, gs_function_Sd_params_t * params,
}
else { /* Size array specified - verify valid */
if (code != params->m || !valid_cube_size(params->m, params->n,
- params->BitsPerSample, params->Size))
- code = gs_note_error(gs_error_rangecheck);
- goto fail;
+ params->BitsPerSample, params->Size)) {
+ code = gs_note_error(gs_error_rangecheck);
+ goto fail;
+ }
}
}
/*