[systemd-devel] [RFC][PATCH 1/2] resolve: resolved-manager: Avoid null dereference

2014-09-13 Thread philippedeswert
From: Philippe De Swert hashmap_get can return null, so as we dereference it immediately after calling it, we could crash. It is unlikely to occur though I expect. I am however unsure what error should be reported (if at all). Coverity CID#1237656 --- src/resolve/resolved-manager.c | 2 ++ 1 fi

Re: [systemd-devel] [RFC][PATCH 1/2] resolve: resolved-manager: Avoid null dereference

2014-10-22 Thread Lennart Poettering
On Sat, 13.09.14 20:40, Tom Gundersen (t...@jklm.no) wrote: > Yeah, this could happen. It so happens that the loopback link will > always have ifindex 1, so I guess we could just fall back to checking > for that if we don't have the real flags. Is that true even in network namespaces? Is this rea

Re: [systemd-devel] [RFC][PATCH 1/2] resolve: resolved-manager: Avoid null dereference

2014-10-22 Thread Lennart Poettering
On Wed, 22.10.14 22:12, Tom Gundersen (t...@jklm.no) wrote: > On Wed, Oct 22, 2014 at 12:19 PM, Lennart Poettering > wrote: > > On Sat, 13.09.14 20:40, Tom Gundersen (t...@jklm.no) wrote: > > > >> Yeah, this could happen. It so happens that the loopback link will > >> always have ifindex 1, so I

Re: [systemd-devel] [RFC][PATCH 1/2] resolve: resolved-manager: Avoid null dereference

2014-10-24 Thread Tom Gundersen
On Wed, Oct 22, 2014 at 10:39 PM, Lennart Poettering wrote: > On Wed, 22.10.14 22:12, Tom Gundersen (t...@jklm.no) wrote: > >> On Wed, Oct 22, 2014 at 12:19 PM, Lennart Poettering >> wrote: >> > On Sat, 13.09.14 20:40, Tom Gundersen (t...@jklm.no) wrote: >> > >> >> Yeah, this could happen. It so

Re: [systemd-devel] [RFC][PATCH 1/2] resolve: resolved-manager: Avoid null dereference

2014-10-24 Thread Tom Gundersen
On Wed, Oct 22, 2014 at 12:19 PM, Lennart Poettering wrote: > On Sat, 13.09.14 20:40, Tom Gundersen (t...@jklm.no) wrote: > >> Yeah, this could happen. It so happens that the loopback link will >> always have ifindex 1, so I guess we could just fall back to checking >> for that if we don't have th

Re: [systemd-devel] [RFC][PATCH 1/2] resolve: resolved-manager: Avoid null dereference

2014-09-13 Thread David Herrmann
Hi On Sat, Sep 13, 2014 at 11:24 AM, wrote: > From: Philippe De Swert > > hashmap_get can return null, so as we dereference it > immediately after calling it, we could crash. > It is unlikely to occur though I expect. I am however unsure > what error should be reported (if at all). > > Coverity

Re: [systemd-devel] [RFC][PATCH 1/2] resolve: resolved-manager: Avoid null dereference

2014-09-13 Thread Tom Gundersen
On Sat, Sep 13, 2014 at 12:10 PM, David Herrmann wrote: > Hi > > On Sat, Sep 13, 2014 at 11:24 AM, wrote: >> From: Philippe De Swert >> >> hashmap_get can return null, so as we dereference it >> immediately after calling it, we could crash. >> It is unlikely to occur though I expect. I am howev