aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBenjamin Jacobs <benj@spam.thsi.be>2018-04-05 22:28:27 +0200
committerBoris Faure <billiob@gmail.com>2018-04-05 22:28:27 +0200
commite55fd612084df03e894d080e1948a104af67a214 (patch)
tree7045d3bcb350cee66548c480310190814b4c0c74 /src
parentselection handling - donmt use null string selections if they are (diff)
downloadterminology-e55fd612084df03e894d080e1948a104af67a214.tar.gz
popmedia: NULL dereferencing prevented in error path.
Summary: If the execution of _popmedia flows in the goto error path, then the term pointer member might not assigned and reference counted. However _ty_http_head_delete and term_unref unconditionaly deference it, resulting in a NULL access. This patch add guards to prevent the dereference of the term pointer in _ty_http_head_delete. Reviewers: billiob Reviewed By: billiob Subscribers: billiob Differential Revision: https://phab.enlightenment.org/D5865
Diffstat (limited to 'src')
-rw-r--r--src/bin/win.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/bin/win.c b/src/bin/win.c
index a4d4579..0564865 100644
--- a/src/bin/win.c
+++ b/src/bin/win.c
@@ -4052,8 +4052,11 @@ _ty_http_head_delete(Ty_Http_Head *ty_head)
eina_stringshare_del(ty_head->src);
ecore_con_url_free(ty_head->url);
ecore_event_handler_del(ty_head->url_complete);
- edje_object_signal_emit(ty_head->term->bg, "done", "terminology");
- term_unref(ty_head->term);
+ if (ty_head->term)
+ {
+ edje_object_signal_emit(ty_head->term->bg, "done", "terminology");
+ term_unref(ty_head->term);
+ }
ecore_timer_del(ty_head->timeout);
free(ty_head);