projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
114b1cc
)
g_thread_create_full() can dereference NULL pointer
author
Milan Crha
<mcrha@redhat.com>
Mon, 22 Jul 2013 07:54:33 +0000
(09:54 +0200)
committer
Milan Crha
<mcrha@redhat.com>
Mon, 22 Jul 2013 07:54:33 +0000
(09:54 +0200)
In case of the thread creation failure, and the thread was not created
as joinable, the g_thread_create_full() could dereference a NULL pointer.
https://bugzilla.gnome.org/show_bug.cgi?id=704523
glib/deprecated/gthread-deprecated.c
patch
|
blob
|
history
diff --git
a/glib/deprecated/gthread-deprecated.c
b/glib/deprecated/gthread-deprecated.c
index
c89d22a
..
89dba4d
100644
(file)
--- a/
glib/deprecated/gthread-deprecated.c
+++ b/
glib/deprecated/gthread-deprecated.c
@@
-374,7
+374,7
@@
g_thread_create_full (GThreadFunc func,
thread = g_thread_new_internal (NULL, g_deprecated_thread_proxy,
func, data, stack_size, error);
- if (!joinable)
+ if (
thread &&
!joinable)
{
thread->joinable = FALSE;
g_thread_unref (thread);