Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dereference of NULL #1043

Open
burkeartem opened this issue Nov 23, 2023 · 1 comment
Open

Dereference of NULL #1043

burkeartem opened this issue Nov 23, 2023 · 1 comment

Comments

@burkeartem
Copy link

Issue description

The method Copy() described in line 119 can return nil, if d == nil condition is true.
In line 85, the pointer is dereferenced, which is the result of this method. Since there is no nil check anywhere before, then the null pointer may be dereferenced and cause panic.

There are also similar problems in the lines:

Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
Author A. Burke.

@chungeun-choi
Copy link

chungeun-choi commented Jan 23, 2024

It seems quite possible for the DNS values in network interface information to be empty. Consequently, referencing a nil value in such cases can lead to panic. It appears that preventing this through prior validation would be appropriate. I'm curious to know what the maintainers think about this approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants