1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 20:50:33 +00:00

Avoid dereference after null check

This commit is contained in:
Carles Fernandez 2018-05-21 04:05:13 +02:00
parent d6654301c5
commit 559cc00bd7
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D

View File

@ -1493,7 +1493,6 @@ void decodeftppath(const char *path, char *addr, char *file, char *user,
*q = '\0'; *q = '\0';
if (passwd) strcpy(passwd, q + 1); if (passwd) strcpy(passwd, q + 1);
} }
if (*q != 0) *q = '\0';
if (user) strcpy(user, buff); if (user) strcpy(user, buff);
} }
else else