summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2019-08-17 14:31:24 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2019-08-17 14:31:24 -0700
commit5561a9dc835a249e58cfdb3c384547f6f401a15d (patch)
tree0b0dfb80391a6326a30230fdfeb71064a0a508b7
parentc84ce6be6a7e2e70c9ab20b60bc7198699690d50 (diff)
fs_read_glyphs: check if rep is null before dereferencing
Resolves coverity warning def16 from the list in https://gitlab.freedesktop.org/xorg/lib/libxfont/issues/6 Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--src/fc/fserve.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/fc/fserve.c b/src/fc/fserve.c
index 824b355..2d9c2c2 100644
--- a/src/fc/fserve.c
+++ b/src/fc/fserve.c
@@ -2079,7 +2079,8 @@ fs_read_glyphs(FontPathElementPtr fpe, FSBlockDataPtr blockrec)
err = Successful;
bail:
- _fs_done_read (conn, rep->length << 2);
+ if (rep)
+ _fs_done_read (conn, rep->length << 2);
return err;
}