]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: Add asserts to t_abspath and t_abspath_to
authorMartti Rannanjärvi <martti.rannanjarvi@dovecot.fi>
Wed, 30 Nov 2016 10:03:30 +0000 (12:03 +0200)
committerGitLab <gitlab@git.dovecot.net>
Mon, 30 Jan 2017 16:48:15 +0000 (18:48 +0200)
src/lib/path-util.c

index d8d3e4ed871f5d7db1be2c8fc8b49e47b394b8b3..b9e5f7c361948fb8b8f80ed96a762a2f6d03cbbb 100644 (file)
@@ -9,6 +9,7 @@
 const char *t_abspath(const char *path)
 {
        const char *dir;
+       i_assert(path != NULL);
 
        if (*path == '/')
                return path;
@@ -20,6 +21,9 @@ const char *t_abspath(const char *path)
 
 const char *t_abspath_to(const char *path, const char *root)
 {
+       i_assert(path != NULL);
+       i_assert(root != NULL);
+
        if (*path == '/')
                return path;