While double checking url_ciss_t usage, I noticed these two functions
could be more robust about checking their parameters.
---
 url.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/url.c b/url.c
index 37d091cf..a813901a 100644
--- a/url.c
+++ b/url.c
@@ -101,6 +101,9 @@ url_scheme_t url_check_scheme(const char *s)
 
 int url_parse_file(char *d, const char *src, size_t dl)
 {
+  if (!src || !d)
+    return -1;
+
   if (ascii_strncasecmp(src, "file:", 5))
     return -1;
   else if (!ascii_strncasecmp(src, "file://", 7))      /* we don't support 
remote files */
@@ -305,6 +308,9 @@ int url_parse_mailto(ENVELOPE *e, char **body, const char 
*src)
 
   LIST *last = NULL;
 
+  if (!src)
+    return -1;
+
   if (!(t = strchr(src, ':')))
     return -1;
 
-- 
2.55.0

Reply via email to