From 617e81d982e512223c456a95df28eab0141a4f21 Mon Sep 17 00:00:00 2001 From: sebres Date: Tue, 17 Sep 2024 15:25:38 +0000 Subject: small amend improving (path in zipfs) lookup --- generic/tclZipfs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c index d8ac050..84e4d34 100644 --- a/generic/tclZipfs.c +++ b/generic/tclZipfs.c @@ -5886,7 +5886,10 @@ ZipFSPathInFilesystemProc( * and sufficient condition as zipfs mounts at arbitrary paths are * not permitted (unlike Androwish). */ - return strncmp(path, ZIPFS_VOLUME, ZIPFS_VOLUME_LEN) ? -1 : TCL_OK; + return ( + (len < ZIPFS_VOLUME_LEN) || + strncmp(path, ZIPFS_VOLUME, ZIPFS_VOLUME_LEN) + ) ? -1 : TCL_OK; } /* -- cgit v0.12