sonic-frr icon indicating copy to clipboard operation
sonic-frr copied to clipboard

lib: check hostname in resolver_resolve

Open inspurSDN opened this issue 2 years ago • 1 comments

resolver_resolve should check hostname is null or not.

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

test result: null

trace code: log1 log1-1

inspurSDN avatar Jul 07 '22 04:07 inspurSDN

@lguohan could you help to review it?

inspurSDN avatar Jul 07 '22 07:07 inspurSDN