fix issues detected by static analyzers
This commit is contained in:
parent
1b17af56ab
commit
5412b38944
68
gettext-0.21-covscan.patch
Normal file
68
gettext-0.21-covscan.patch
Normal file
@ -0,0 +1,68 @@
|
||||
diff --git a/gettext-tools/src/msgl-cat.c b/gettext-tools/src/msgl-cat.c
|
||||
index 990d39e..9814502 100644
|
||||
--- a/gettext-tools/src/msgl-cat.c
|
||||
+++ b/gettext-tools/src/msgl-cat.c
|
||||
@@ -306,6 +306,7 @@ catenate_msgdomain_list (string_list_ty *file_list,
|
||||
mp->msgid);
|
||||
multiline_error (xstrdup (""),
|
||||
xasprintf ("%s\n", errormsg));
|
||||
+ free (errormsg);
|
||||
}
|
||||
}
|
||||
else
|
||||
diff --git a/gettext-tools/src/x-csharp.c b/gettext-tools/src/x-csharp.c
|
||||
index 5cf72ad..7a0e5d3 100644
|
||||
--- a/gettext-tools/src/x-csharp.c
|
||||
+++ b/gettext-tools/src/x-csharp.c
|
||||
@@ -560,6 +560,7 @@ comment_line_end (size_t chars_to_remove)
|
||||
buffer[buflen] = '\0';
|
||||
savable_comment_add (buffer);
|
||||
lexical_context = lc_outside;
|
||||
+ free (buffer);
|
||||
}
|
||||
|
||||
|
||||
diff --git a/gettext-tools/src/x-java.c b/gettext-tools/src/x-java.c
|
||||
index eff1e6f..7e1bb78 100644
|
||||
--- a/gettext-tools/src/x-java.c
|
||||
+++ b/gettext-tools/src/x-java.c
|
||||
@@ -460,6 +460,7 @@ comment_line_end (size_t chars_to_remove)
|
||||
--buflen;
|
||||
buffer[buflen] = '\0';
|
||||
savable_comment_add (buffer);
|
||||
+ free (buffer);
|
||||
}
|
||||
|
||||
|
||||
diff --git a/gettext-tools/src/x-rst.c b/gettext-tools/src/x-rst.c
|
||||
index cde1ee6..fca441e 100644
|
||||
--- a/gettext-tools/src/x-rst.c
|
||||
+++ b/gettext-tools/src/x-rst.c
|
||||
@@ -651,6 +651,7 @@ extract_rsj (FILE *f,
|
||||
else
|
||||
goto invalid_rsj;
|
||||
|
||||
+ free (s1);
|
||||
/* Parse a comma. */
|
||||
c = phase2_getc ();
|
||||
if (c == '}')
|
||||
@@ -667,6 +668,7 @@ extract_rsj (FILE *f,
|
||||
|
||||
fp = NULL;
|
||||
real_file_name = NULL;
|
||||
+ free (logical_file_name);
|
||||
logical_file_name = NULL;
|
||||
line_number = 0;
|
||||
|
||||
diff --git a/gettext-tools/src/xg-arglist-callshape.c b/gettext-tools/src/xg-arglist-callshape.c
|
||||
index 06b7076..2189aac 100644
|
||||
--- a/gettext-tools/src/xg-arglist-callshape.c
|
||||
+++ b/gettext-tools/src/xg-arglist-callshape.c
|
||||
@@ -118,6 +118,7 @@ split_keywordspec (const char *spec,
|
||||
memcpy (xcomment, xcomment_start, xcomment_len);
|
||||
xcomment[xcomment_len] = '\0';
|
||||
string_list_append (&xcomments, xcomment);
|
||||
+ free (xcomment);
|
||||
}
|
||||
else
|
||||
break;
|
@ -4,7 +4,7 @@
|
||||
Summary: GNU libraries and utilities for producing multi-lingual messages
|
||||
Name: gettext
|
||||
Version: 0.21
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
# The following are licensed under LGPLv2+:
|
||||
# - libintl and its headers
|
||||
# - libasprintf and its headers
|
||||
@ -30,6 +30,7 @@ Source3: msghack.1
|
||||
# https://lists.gnu.org/archive/html/bug-gnulib/2020-07/msg00195.html
|
||||
Patch1: gettext-0.21-gnulib-perror-tests.patch
|
||||
Patch2: gettext-0.21-disable-libtextstyle.patch
|
||||
Patch3: gettext-0.21-covscan.patch
|
||||
|
||||
# for bootstrapping
|
||||
# BuildRequires: autoconf >= 2.62
|
||||
@ -370,6 +371,9 @@ make check LIBUNISTRING=-lunistring
|
||||
%{_mandir}/man1/msghack.1*
|
||||
|
||||
%changelog
|
||||
* Tue May 11 2021 Sundeep Anand <suanand@redhat.com> - 0.21-6
|
||||
- Add gettext-0.21-covscan.patch to fix issues detected by static analyzers
|
||||
|
||||
* Fri Apr 30 2021 Sundeep Anand <suanand@redhat.com> - 0.21-5
|
||||
- Add gettext-0.21-disable-libtextstyle.patch
|
||||
Do not build libtextstyle, as it depends on libcroco
|
||||
|
Loading…
Reference in New Issue
Block a user