Mesa (master): gallium/hud: fix possible NULL pointer dereference

Marek Olšák mareko at kemper.freedesktop.org
Sat Oct 17 17:06:54 UTC 2015


Module: Mesa
Branch: master
Commit: 006fcc0da674ca18ebf07771e3c309997ab32798
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=006fcc0da674ca18ebf07771e3c309997ab32798

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Sat Oct 17 19:05:46 2015 +0200

gallium/hud: fix possible NULL pointer dereference

Trivial.

---

 src/gallium/auxiliary/hud/hud_context.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/auxiliary/hud/hud_context.c b/src/gallium/auxiliary/hud/hud_context.c
index 95eed26..ffe30b8 100644
--- a/src/gallium/auxiliary/hud/hud_context.c
+++ b/src/gallium/auxiliary/hud/hud_context.c
@@ -987,6 +987,9 @@ hud_parse_env_var(struct hud_context *hud, const char *env)
 
       case ',':
          env++;
+         if (!pane)
+            break;
+
          y += height + hud->font.glyph_height * (pane->num_graphs + 2);
          height = 100;
 




More information about the mesa-commit mailing list