From 559cc00bd7e31197881d0d4d518f7869b2dde899 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 21 May 2018 04:05:13 +0200 Subject: [PATCH] Avoid dereference after null check --- src/algorithms/libs/rtklib/rtklib_stream.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/src/algorithms/libs/rtklib/rtklib_stream.cc b/src/algorithms/libs/rtklib/rtklib_stream.cc index b301cfb1b..2810bc6cc 100644 --- a/src/algorithms/libs/rtklib/rtklib_stream.cc +++ b/src/algorithms/libs/rtklib/rtklib_stream.cc @@ -1493,7 +1493,6 @@ void decodeftppath(const char *path, char *addr, char *file, char *user, *q = '\0'; if (passwd) strcpy(passwd, q + 1); } - if (*q != 0) *q = '\0'; if (user) strcpy(user, buff); } else