]> git.cameronkatri.com Git - cgit.git/blobdiff - cgit.h
Fix out-of-bounds memory accesses with virtual_root=""
[cgit.git] / cgit.h
diff --git a/cgit.h b/cgit.h
index 081f669a8a5c438265cfd39b1443e0ebf876f3db..fc3fc6fb29b36cd65db6fa2231ea3caa8f248229 100644 (file)
--- a/cgit.h
+++ b/cgit.h
@@ -190,7 +190,7 @@ struct cgit_config {
        char *script_name;
        char *section;
        char *repository_sort;
-       char *virtual_root;
+       char *virtual_root;     /* Always ends with '/'. */
        char *strict_export;
        int cache_size;
        int cache_dynamic_ttl;
@@ -300,6 +300,7 @@ extern int chk_positive(int result, char *msg);
 extern int chk_non_negative(int result, char *msg);
 
 extern char *trim_end(const char *str, char c);
+extern char *ensure_end(const char *str, char c);
 extern char *strlpart(char *txt, int maxlen);
 extern char *strrpart(char *txt, int maxlen);