]> git.pld-linux.org Git - packages/wget.git/commitdiff
fix for double free in free_vec auto/th/wget-1.16.3-3
authorKacper Kornet <draenog@pld-linux.org>
Mon, 20 Apr 2015 18:20:56 +0000 (19:20 +0100)
committerKacper Kornet <draenog@pld-linux.org>
Mon, 20 Apr 2015 18:20:56 +0000 (19:20 +0100)
wget-free.patch [new file with mode: 0644]
wget.spec

diff --git a/wget-free.patch b/wget-free.patch
new file mode 100644 (file)
index 0000000..f4cc07c
--- /dev/null
@@ -0,0 +1,26 @@
+commit ac40b84ee138d45379046e21e31d237f6937a014
+Author: Hubert Tarasiuk <hubert.tarasiuk@gmail.com>
+Date:   Fri Apr 10 11:52:34 2015 +0200
+
+    Fix error in free_vec.
+    
+    * src/utils.c (free_vec): Increment pointer instead of its value.
+    
+    Reported-by: Gisle Vanem <gvanem@yahoo.no>
+
+diff --git a/src/utils.c b/src/utils.c
+index 617f547..3c8f4f9 100644
+--- a/src/utils.c
++++ b/src/utils.c
+@@ -1284,7 +1284,10 @@ free_vec (char **vec)
+     {
+       char **p = vec;
+       while (*p)
+-        xfree (*p++);
++        {
++          xfree (*p);
++          p++;
++        }
+       xfree (vec);
+     }
+ }
index 9f7ea7ca1345eb69c10821a66acbc44431f269a4..48b44a41ec41b6789476e1a74327bb2ccd704f43 100644 (file)
--- a/wget.spec
+++ b/wget.spec
@@ -18,7 +18,7 @@ Summary(uk.UTF-8):    Утиліта для отримання файлів по п
 Summary(zh_CN.UTF-8):  [通讯]功能强大的下载程序,支持断点续传
 Name:          wget
 Version:       1.16.3
-Release:       2
+Release:       3
 License:       GPL v3+ with OpenSSL exception
 Group:         Networking/Utilities
 Source0:       http://ftp.gnu.org/gnu/wget/%{name}-%{version}.tar.xz
@@ -30,6 +30,7 @@ Patch1:               %{name}-wgetrc_path.patch
 Patch2:                %{name}-home_etc.patch
 Patch3:                %{name}-ssl-certs.patch
 Patch4:                user.xdg.origin.url.patch
+Patch5:                %{name}-free.patch
 URL:           http://www.gnu.org/software/wget/
 BuildRequires: attr-devel
 BuildRequires: autoconf >= 2.61
@@ -134,6 +135,7 @@ Proxy серверів, настроюваність.
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 
 %{__rm} doc/wget.info doc/sample.wgetrc.munged_for_texi_inclusion po/stamp-po
 
This page took 0.107123 seconds and 4 git commands to generate.