]> git.puffer.fish Git - mirror/frr.git/commit
lib: check hostname in resolver_resolve 11550/head
authorkevinshen <kevinshen@inspur.com>
Thu, 7 Jul 2022 04:10:03 +0000 (12:10 +0800)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Thu, 7 Jul 2022 07:10:26 +0000 (07:10 +0000)
commitff2bf2ceaef5fa864ec65b3f61a1909efd352505
tree7b6fb2de575c59864eb36ef09877ca679eeb3b56
parent068296fc7a06b1a47339c48f9c725baca0324094
lib: check hostname in resolver_resolve

resolver_resolve should check hostname is null or not.

if ares_gethostbyname() get null hostname string, the hostname string will access a null pointer and crash.

Signed-off-by: kevinshen <kevinshen@inspur.com>
(cherry picked from commit 30220d1e35a92bbf3e6694d81b308630c7db27c3)
lib/resolver.c [changed mode: 0644->0755]