From ef6c0131cbc1ed1ba4250a60651fde91644104e2f56f5d47f54244cf65845a39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 25 Mar 2015 10:08:56 +0000 Subject: [PATCH] - Update patch bit more for sanity checks. Done by rsassu@suse.de: * vsftpd-path-normalize.patch OBS-URL: https://build.opensuse.org/package/show/network/vsftpd?expand=0&rev=79 --- vsftpd-path-normalize.patch | 14 +++++++++++--- vsftpd.changes | 6 ++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/vsftpd-path-normalize.patch b/vsftpd-path-normalize.patch index 20e4ceb..93363bf 100644 --- a/vsftpd-path-normalize.patch +++ b/vsftpd-path-normalize.patch @@ -28,7 +28,7 @@ Index: vsftpd-3.0.2/str.c /* Ick. Its for die() */ #include "utility.h" #include "sysutil.h" -@@ -781,3 +787,52 @@ str_basename (struct mystr* d_str, const +@@ -781,3 +787,60 @@ str_basename (struct mystr* d_str, const if (str_isempty(d_str)) str_copy (d_str, path); } @@ -44,8 +44,16 @@ Index: vsftpd-3.0.2/str.c + + /* normalize filepath */ + path = str_strdup(filepath); ++ if (path == NULL) ++ { ++ return; ++ } + char *ch1 = strdup(path); + char *ch2 = strdup(path); ++ if (ch1 == NULL || ch2 == NULL) ++ { ++ goto out; ++ } + /* we split dir/file as realpath /home/REGEXP is NULL so we need dir + * dir only to function correctly, later on we need to glue back the + * file if there is some @@ -74,12 +82,12 @@ Index: vsftpd-3.0.2/str.c + * needed /home. + */ + str_copy(filepath, &tmp); -+out: + free(normdir); ++ str_free(&tmp); ++out: + free(path); + free(ch1); + free(ch2); -+ str_free(&tmp); +} Index: vsftpd-3.0.2/str.h =================================================================== diff --git a/vsftpd.changes b/vsftpd.changes index d9bb242..6c25055 100644 --- a/vsftpd.changes +++ b/vsftpd.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Mar 25 10:08:03 UTC 2015 - tchvatal@suse.com + +- Update patch bit more for sanity checks. Done by rsassu@suse.de: + * vsftpd-path-normalize.patch + ------------------------------------------------------------------- Mon Mar 23 20:13:51 UTC 2015 - tchvatal@suse.com