summaryrefslogtreecommitdiff
path: root/base/gzspotan.c
diff options
context:
space:
mode:
authorKen Sharp <ken.sharp@artifex.com>2017-09-05 11:41:38 +0100
committerKen Sharp <ken.sharp@artifex.com>2017-09-05 11:41:38 +0100
commitaa75f905024bdf13882c30e543d64e285e22aad1 (patch)
treee2b1635496f455d3695c99094c42dca2d73caaa3 /base/gzspotan.c
parent06b5a54361525363bdc163b88f965f0d1a295087 (diff)
downloadghostpdl-aa75f905024bdf13882c30e543d64e285e22aad1.tar.gz
Coverity ID 158395
I think its not currently possible to trigger this, as it would require setting up the device pointer incorrectly before entering this routine. However Coverity is correct that it appears possible to end up doing a NULL pointer dereference, so add a guard to maek sure that can't happen.
Diffstat (limited to 'base/gzspotan.c')
-rw-r--r--base/gzspotan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/base/gzspotan.c b/base/gzspotan.c
index f9999a9d0..3f1393d39 100644
--- a/base/gzspotan.c
+++ b/base/gzspotan.c
@@ -524,7 +524,7 @@ gx_san_trap_store(gx_device_spot_analyzer *padev,
while (padev->bot_current != NULL && padev->bot_current->xrtop < xlbot)
padev->bot_current = (trap_is_last(padev->bot_band, padev->bot_current)
? NULL : padev->bot_current->next);
- if (padev->bot_current != 0) {
+ if (padev->bot_current != 0 && padev->bot_band != NULL) {
gx_san_trap *t = padev->bot_current;
gx_san_trap *bot_last = band_list_last(padev->bot_band);