import watchdog-5.16-2.el9

This commit is contained in:
CentOS Sources 2021-12-07 12:33:49 -05:00 committed by Stepan Oksanichenko
parent dfbfffff6f
commit 17d23c1dbb
2 changed files with 26 additions and 1 deletions

View File

@ -0,0 +1,19 @@
diff -ruNp a/src/run-as-child.c b/src/run-as-child.c
--- a/src/run-as-child.c 2021-10-14 08:17:04.556107815 +0200
+++ b/src/run-as-child.c 2021-10-14 08:36:23.686706344 +0200
@@ -98,8 +98,14 @@ int exec_as_func(int flags, void *ptr)
/* Create single string with all command line options. */
int ii = 1;
char *opt = strdup(":");
+ char *tempOpt;
while (opt != NULL && arg[ii] != NULL) {
- opt = realloc(opt, strlen(opt) + strlen(arg[ii]) + 2);
+ tempOpt = realloc(opt, strlen(opt) + strlen(arg[ii]) + 2);
+ if (tempOpt != NULL){
+ opt = tempOpt;
+ } else {
+ break;
+ }
opt = strcat(opt, " ");
opt = strcat(opt, arg[ii]);
ii++;

View File

@ -1,7 +1,7 @@
Summary: Software and/or Hardware watchdog daemon
Name: watchdog
Version: 5.16
Release: 1%{?dist}
Release: 2%{?dist}
License: GPLv2+
URL: http://sourceforge.net/projects/watchdog/
@ -13,6 +13,8 @@ Source5: watchdog-ping.service
# Fixes building on glibc without RPC. Sent upstream 2019-02-06.
Patch1: 0001-Choose-libtirpc-or-another-RPC-library-for-XDR-heade.patch
# Fixes potentional mem leak
Patch2: 0002-mem-leak-verbose.patch
# Non-upstream patch to document SELinux support.
Patch99: 0099-watchdog-5.16-rhseldoc.patch
@ -49,6 +51,7 @@ expiration) initiated by the BMC.
%prep
%setup -q -n %{name}-%{version}
%patch1 -p1
%patch2 -p1
%patch99 -p1 -b .rhseldoc
autoreconf -i
@ -124,6 +127,9 @@ rm %{name}.sysconfig
%changelog
* Thu Oct 14 2021 Josef Ridky <jridky@redhat.com> - 5.16-2
- fix memory leak when verbose mode is on (#1997755)
* Tue Aug 10 2021 Josef Ridky <jridky@redhat.com> - 5.16-1
- New upstream release 5.16