From 3f1d89ed242cec808d80fc2d0eef45a77c295a5d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 13 Apr 2023 09:23:01 +0200 Subject: [PATCH] urlapi: skip a pointless assign It stores a null byte after already having confirmed there is a null byte there. Detected by PVS. Ref: #10929 Closes #10943 --- lib/urlapi.c | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/urlapi.c b/lib/urlapi.c index e45d056bca..15e31ec6d1 100644 --- a/lib/urlapi.c +++ b/lib/urlapi.c @@ -541,7 +541,6 @@ UNITTEST CURLUcode Curl_parse_port(struct Curl_URL *u, struct dynbuf *host, if(rest[0]) return CURLUE_BAD_PORT_NUMBER; - *rest = 0; u->portnum = port; /* generate a new port number string to get rid of leading zeroes etc */ u->port = aprintf("%ld", port);