summaryrefslogtreecommitdiff
path: root/base/gp.h
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2019-06-20 12:24:04 +0100
committerChris Liddell <chris.liddell@artifex.com>2019-07-02 10:37:18 +0100
commit1b83ee86dc775a9d7972d94041e226893983b264 (patch)
tree617078fcb0413c1c1cccf739736e2f3d36645431 /base/gp.h
parent56158b2c2d8fb9bd5e5bbb9be645fb88231c4898 (diff)
downloadghostpdl-1b83ee86dc775a9d7972d94041e226893983b264.tar.gz
File access control: handle non-null terminated paths
Add an access control checking API call that can take a non-null terminated string (i.e. takes a string and length). The reason being the strings returned from gp_enumerate_files* are not null terminated, and we need to filter them by permissions.
Diffstat (limited to 'base/gp.h')
-rw-r--r--base/gp.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/base/gp.h b/base/gp.h
index b4b334c5f..3cd31c930 100644
--- a/base/gp.h
+++ b/base/gp.h
@@ -684,6 +684,12 @@ int
gp_xpsprint(char *filename, char *printername, int *result);
int
+gp_validate_path_len(const gs_memory_t *mem,
+ const char *path,
+ const uint rlen,
+ const char *mode);
+
+int
gp_validate_path(const gs_memory_t *mem,
const char *path,
const char *mode);