summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Beckett <dave@dajobe.org>2022-07-03 21:31:08 -0700
committerDave Beckett <dave@dajobe.org>2022-07-03 21:36:32 -0700
commit7a78f11eebce6c8c7df203da8a321e5461689bd3 (patch)
treeb5ad3018f848dd41f6e97fcdd57bf38c9522db0f
parent3cca62a33da68143b687c9e486eefc7c7cbb4586 (diff)
downloadraptor-7a78f11eebce6c8c7df203da8a321e5461689bd3.tar.gz
(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
-rw-r--r--src/raptor_uri.c2
1 files changed, 1 insertions, 1 deletions
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;