AFBClient: fix port sanity check
authorMarcus Fritzsch <marcus_fritzsch@mentor.com>
Tue, 5 Sep 2017 14:45:49 +0000 (16:45 +0200)
committerMarcus Fritzsch <marcus_fritzsch@mentor.com>
Thu, 14 Sep 2017 12:04:51 +0000 (14:04 +0200)
Signed-off-by: Marcus Fritzsch <marcus_fritzsch@mentor.com>
AFBClient.cpp

index fbffb2c..1677509 100644 (file)
@@ -172,7 +172,7 @@ int AFBClient::Impl::init(int port, char const *token) {
         }
     }
 
-    if (port < 1 && port > 0xffff) {
+    if (port < 1 || port > 0xffff) {
         fputs("Port is invalid\n", stderr);
         rc = -EINVAL;
         goto fail;