fix the build issue with gperf-3.1

This commit is contained in:
jpzhang 2020-07-15 15:07:33 +08:00
parent 66b170d713
commit 80966a2da5
2 changed files with 57 additions and 2 deletions

View File

@ -0,0 +1,47 @@
From f7eea39940917922a31185ce0735059d66374928 Mon Sep 17 00:00:00 2001
From: jpzhang <jpzhang187@163.com>
Date: Wed, 15 Jul 2020 11:50:44 +0800
Subject: [PATCH] fix the build issue with gperf-3.1
diff --git a/compat.h b/compat.h
index 8af71ec..b3d80d9 100644
--- a/compat.h
+++ b/compat.h
@@ -34,7 +34,7 @@ struct id3_compat {
};
struct id3_compat const *id3_compat_lookup(register char const *,
- register unsigned int);
+ register size_t);
int id3_compat_fixup(struct id3_tag *);
diff --git a/frametype.c b/frametype.c
index 13c5001..4d7e0f8 100644
--- a/frametype.c
+++ b/frametype.c
@@ -357,7 +357,7 @@ __inline
const struct id3_frametype *
id3_frametype_lookup (str, len)
register const char *str;
- register unsigned int len;
+ register size_t len;
{
static const struct id3_frametype wordlist[] =
{
diff --git a/frametype.h b/frametype.h
index dd064b2..b5b7593 100644
--- a/frametype.h
+++ b/frametype.h
@@ -37,6 +37,6 @@ extern struct id3_frametype const id3_frametype_unknown;
extern struct id3_frametype const id3_frametype_obsolete;
struct id3_frametype const *id3_frametype_lookup(register char const *,
- register unsigned int);
+ register size_t);
# endif
--
2.23.0

View File

@ -1,14 +1,15 @@
Name: libid3tag
Version: 0.15.1b
Release: 20
Release: 21
Summary: ID3 tag manipulation library
License: GPLv2+
URL: http://www.underbit.com/products/mad/
Source0: http://downloads.sourceforge.net/mad/%{name}-%{version}.tar.gz
Patch0: libid3tag-0.15.1b-fix_overflow.patch
Patch1: libid3tag-0.15.1b-fix-the-build-issue-with-gperf-3.1.patch
Patch6000: CVE-2004-2779.patch
Patch6001: CVE-2017-11550.patch
BuildRequires: zlib-devel >= 1.1.4 libtool
BuildRequires: zlib-devel >= 1.1.4 libtool gperf >= 3.1
%description
libid3tag is a library for reading and (eventually) writing ID3 tags,
@ -24,6 +25,7 @@ ID3 tag library development files.
%prep
%setup -q
%patch0 -p0 -b .CVE-2008-2109
%patch1 -p1
%patch6000 -p1
%patch6001 -p1
touch NEWS AUTHORS ChangeLog
@ -71,6 +73,12 @@ install -Dpm 644 %{name}.pc $RPM_BUILD_ROOT%{_libdir}/pkgconfig/id3tag.pc
%changelog
* Wed Jul 15 2020 zhangjiapeng<zhangjiapeng9@huawei.com> - 0.15.1b-21
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: fix the build issue with gperf-3.1
* Fri Mar 20 2020 lingsheng<lingsheng@huawei.com> - 0.15.1b-20
- Type:cves
- ID:CVE-2017-11550