From 7a78f11eebce6c8c7df203da8a321e5461689bd3 Mon Sep 17 00:00:00 2001 From: Dave Beckett Date: Sun, 3 Jul 2022 21:31:08 -0700 Subject: (raptor_uri_counted_filename_to_uri_string): Copy NUL when copyin file:// prefix. Coverity false positive since the following lines of code always add more characters and a NUL. "Fixes" CID 353858 --- src/raptor_uri.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/raptor_uri.c b/src/raptor_uri.c index 7fd6c075..53768e72 100644 --- a/src/raptor_uri.c +++ b/src/raptor_uri.c @@ -765,7 +765,7 @@ raptor_uri_counted_filename_to_uri_string(const char *filename, if(!buffer) goto path_done; - memcpy(buffer, "file://", RAPTOR_LEN_FILE_CSS); + memcpy(buffer, "file://", RAPTOR_LEN_FILE_CSS + 1); /* copy NUL */ from = filename; to = (char*)(buffer + RAPTOR_LEN_FILE_CSS); fl = filename_len; -- cgit v1.2.1