[Commits] [SCM] claws branch, master, updated. 3.14.0-66-g51481e4
mones at claws-mail.org
mones at claws-mail.org
Fri Sep 9 21:28:32 CEST 2016
The branch, master has been updated
via 51481e41cb6a7dd60783601c33aa4c13a95f0253 (commit)
from 831b8da1ebf3eabcae4c9cea8a72daf19aaeed25 (commit)
Summary of changes:
src/plugins/archive/libarchive_archive.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
- Log -----------------------------------------------------------------
commit 51481e41cb6a7dd60783601c33aa4c13a95f0253
Author: Ricardo Mones <ricardo at mones.org>
Date: Fri Sep 9 21:27:35 2016 +0200
Fix potential out-of-bounds read
diff --git a/src/plugins/archive/libarchive_archive.c b/src/plugins/archive/libarchive_archive.c
index 5499d1e..018108b 100644
--- a/src/plugins/archive/libarchive_archive.c
+++ b/src/plugins/archive/libarchive_archive.c
@@ -284,18 +284,10 @@ static void archive_add_to_list(struct file_info* file) {
}
static gchar* strip_leading_dot_slash(gchar* path) {
- gchar* stripped = path;
- gchar* result = NULL;
+ if (path && strlen(path) > 1 && path[0] == '.' && path[1] == '/')
+ return g_strdup(&(path[2]));
- if (stripped && stripped[0] == '.') {
- ++stripped;
- if (stripped && stripped[0] == '/')
- ++stripped;
- result = g_strdup(stripped);
- }
- else
- result = g_strdup(path);
- return result;
+ return g_strdup(path);
}
static gchar* get_full_path(struct file_info* file) {
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list