From cf6c80f8f037bf3806c065ed0ad48b209a49a9d2 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Sun, 28 Dec 2014 13:55:33 +0100 Subject: - added segv patch (buffer overflow fix from git) - release 3 diff --git a/libytnef-segv.patch b/libytnef-segv.patch new file mode 100644 index 0000000..cdde2b8 --- /dev/null +++ b/libytnef-segv.patch @@ -0,0 +1,11 @@ +--- libytnef-1.5/ytnef.c.orig 2004-08-26 19:09:05.000000000 +0200 ++++ libytnef-1.5/ytnef.c 2014-12-28 13:22:11.710584874 +0100 +@@ -1328,7 +1328,7 @@ + + comp_Prebuf.size = strlen(RTF_PREBUF); + comp_Prebuf.data = calloc(comp_Prebuf.size, 1); +- strcpy(comp_Prebuf.data, RTF_PREBUF); ++ memcpy(comp_Prebuf.data, RTF_PREBUF, comp_Prebuf.size); + + src = p->data; + in = 0; diff --git a/libytnef.spec b/libytnef.spec index 25896be..31b97d6 100644 --- a/libytnef.spec +++ b/libytnef.spec @@ -3,11 +3,12 @@ Summary: C library for decoding application/ms-tnef e-mail attachments Summary(pl.UTF-8): Biblioteka C do dekodowania załączników e-maili typu application/ms-tnef Name: libytnef Version: 1.5 -Release: 2 -License: GPL v2 +Release: 3 +License: GPL v2+ Group: Libraries Source0: http://downloads.sourceforge.net/ytnef/%{name}-%{version}.tar.gz # Source0-md5: 6c44b955f33cf714c75a7bbe895cc352 +Patch0: %{name}-segv.patch URL: http://ytnef.sourceforge.net/ BuildRequires: autoconf >= 2.50 BuildRequires: automake @@ -49,6 +50,7 @@ Statyczna biblioteka libytnef. %prep %setup -q +%patch0 -p1 %build %{__libtoolize} -- cgit v0.10.2