stefan pushed a commit to branch master.
commit 91426926c5ae9dd1d908765a651d554665d69767
Author: Stefan Schmidt <[email protected]>
Date: Wed Aug 7 15:38:35 2013 +0100
ecore_evas: Fix potential NULL dereference.
We don't want to execute any of the function below if t is NULL. Its not
only about strdup but alsa ecore_x_netwm_name_set which might dereference
it.
CID 1039400
---
src/modules/ecore_evas/engines/x/ecore_evas_x.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/modules/ecore_evas/engines/x/ecore_evas_x.c
b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
index 8606377..627dd15 100644
--- a/src/modules/ecore_evas/engines/x/ecore_evas_x.c
+++ b/src/modules/ecore_evas/engines/x/ecore_evas_x.c
@@ -2587,7 +2587,8 @@ _ecore_evas_x_title_set(Ecore_Evas *ee, const char *t)
{
if (ee->prop.title) free(ee->prop.title);
ee->prop.title = NULL;
- if (t) ee->prop.title = strdup(t);
+ if (!t) return;
+ ee->prop.title = strdup(t);
ecore_x_icccm_title_set(ee->prop.window, ee->prop.title);
ecore_x_netwm_name_set(ee->prop.window, ee->prop.title);
}
--
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk