coverity: #1248104

Argument cannot be negative Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 6aea671c
...@@ -592,6 +592,8 @@ static char *is_wlan(const char *ifname) ...@@ -592,6 +592,8 @@ static char *is_wlan(const char *ifname)
fseek(f, 0, SEEK_END); fseek(f, 0, SEEK_END);
physlen = ftell(f); physlen = ftell(f);
fseek(f, 0, SEEK_SET); fseek(f, 0, SEEK_SET);
if (physlen < 0)
goto bad;
physname = malloc(physlen + 1); physname = malloc(physlen + 1);
if (!physname) { if (!physname) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment