!12 Fix build failure caused by gcc upgrade to 12.3.1

From: @starlet-dx 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
This commit is contained in:
openeuler-ci-bot 2023-07-15 02:19:00 +00:00 committed by Gitee
commit 41df89f615
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 29 additions and 1 deletions

View File

@ -0,0 +1,24 @@
From: Ying-Chun Liu (PaulLiu) <paulliu@debian.org>
Subject: fix FTBFS with GCC-11
We need to malloc line before using it.
Bug-Debian: http://bugs.debian.org/984195
Index: libomxil-bellagio-0.9.3/src/core_extensions/OMXCoreRMExt.c
===================================================================
--- libomxil-bellagio-0.9.3.orig/src/core_extensions/OMXCoreRMExt.c
+++ libomxil-bellagio-0.9.3/src/core_extensions/OMXCoreRMExt.c
@@ -169,6 +169,7 @@ OMX_ERRORTYPE readRegistryFile() {
}
free(registry_filename);
libname = malloc(OMX_MAX_STRINGNAME_SIZE * 2);
+ line = malloc(MAX_LINE_LENGTH+1);
fseek(omxregistryfp, 0, 0);
while(1) {
@@ -193,7 +194,6 @@ OMX_ERRORTYPE readRegistryFile() {
fseek(omxregistryfp, 0, 0);
qualityList = malloc(numberOfLines * sizeof (stLoaderComponentType*));
qualityListItems = numberOfLines;
- line = malloc(MAX_LINE_LENGTH);
listindex = 0;
while(1) {

View File

@ -1,6 +1,6 @@
Name: libomxil-bellagio
Version: 0.9.3
Release: 22
Release: 23
Summary: OpenMAX Integration Layer
License: LGPLv2+
URL: http://omxil.sourceforge.net
@ -16,6 +16,7 @@ Patch0008: libomxil-bellagio-0.9.3-memcpy.patch
Patch0009: libomxil-bellagio-0.9.3-valgrind_register.patch
Patch0010: fix-stringop-overflow.patch
Patch0011: fix-multi-define.patch
Patch0012: Fix-FTBFS-with-gcc12.patch
BuildRequires: doxygen libtool gcc-c++
%description
@ -100,6 +101,9 @@ install -pm 0755 test/components/resource_manager/.libs/{omxprioritytest,omxrmte
%changelog
* Sat Jul 15 2023 yaoxin <yao_xin001@hoperun.com> - 0.9.3-23
- Fix build failure caused by gcc upgrade to 12.3.1
* Sat Jul 31 2021 luweitao <luweitao2@huawei.com> - 0.9.3-22
- fix failure by upgrade to GCC-10