]> git.ipfire.org Git - thirdparty/lxc.git/commit
lxccontainer: avoid NULL pointer dereference
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 6 May 2017 21:38:22 +0000 (23:38 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Tue, 9 May 2017 16:33:08 +0000 (12:33 -0400)
commit107fd8bf87b1b00f30a1c506c02887d8d4814af7
treeb19c0bd28cc96d7344918ff35b9bbabf7f445959
parent62053667c79ba7bcf83569bdd8bf2ed2714fe9e4
lxccontainer: avoid NULL pointer dereference

In case the lxc command socket is hashed and the socket was created for a
different path than the one we're currently querying
lxc_cmd_get_{lxcpath,name}() can return NULL. The command socket path is hashed
when len(lxcpath) > sizeof(sun_path) - 2.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/lxccontainer.c