From 1af3e43014341b5112e90dd44b7c5504a62bf0bc Mon Sep 17 00:00:00 2001 From: sc0w Date: Mon, 2 May 2016 20:50:46 +0200 Subject: fix extracting files with single-character names. #125 --- src/fr-archive.c | 2 +- src/glib-utils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/fr-archive.c b/src/fr-archive.c index 56a9918..fcb4c82 100644 --- a/src/fr-archive.c +++ b/src/fr-archive.c @@ -2911,7 +2911,7 @@ compute_base_path (const char *base_dir, return new_path; } - if (path_len <= base_dir_len) + if (path_len < base_dir_len) return NULL; base_path = path + base_dir_len; diff --git a/src/glib-utils.c b/src/glib-utils.c index 9761091..27d4548 100644 --- a/src/glib-utils.c +++ b/src/glib-utils.c @@ -751,7 +751,7 @@ _g_path_get_base_name (const char *path, return _g_path_get_file_name (path); base_dir_len = strlen (base_dir); - if (strlen (path) <= base_dir_len) + if (strlen (path) < base_dir_len) return NULL; base_path = path + base_dir_len; -- cgit v1.2.1