Fix gdbmtool parm import error
This commit is contained in:
parent
da8f788189
commit
e81f11ea81
36
Fix-gdbmtool-import-command.patch
Normal file
36
Fix-gdbmtool-import-command.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
From 4f456e7c4b9e3727a83bc3d30ac929402f7ef81a Mon Sep 17 00:00:00 2001
|
||||||
|
From: yangchenguang <yangchenguang@uniontech.com>
|
||||||
|
Date: Fri, 19 Nov 2021 10:44:24 +0800
|
||||||
|
Subject: [PATCH] Fix gdbmtool import command
|
||||||
|
|
||||||
|
* src/gdbmtool.c (import_handler): Fix option addressing (see
|
||||||
|
https://puszcza.gnu.org.ua/bugs/?535).
|
||||||
|
Fix freeing of the uninitialized variable.
|
||||||
|
---
|
||||||
|
src/gdbmtool.c | 3 +--
|
||||||
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/gdbmtool.c b/src/gdbmtool.c
|
||||||
|
index bbadbae..03ba482 100644
|
||||||
|
--- a/src/gdbmtool.c
|
||||||
|
+++ b/src/gdbmtool.c
|
||||||
|
@@ -1003,7 +1003,7 @@ import_handler (struct handler_param *param)
|
||||||
|
int i;
|
||||||
|
int rc;
|
||||||
|
|
||||||
|
- for (i = 0; i < param->argc; i++)
|
||||||
|
+ for (i = 1; i < param->argc; i++)
|
||||||
|
{
|
||||||
|
if (strcmp (PARAM_STRING (param, i), "replace") == 0)
|
||||||
|
flag = GDBM_REPLACE;
|
||||||
|
@@ -1054,7 +1054,6 @@ import_handler (struct handler_param *param)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
- free (file_name);
|
||||||
|
if (gdbm_setopt (gdbm_file, GDBM_GETDBNAME, &file_name, sizeof (file_name)))
|
||||||
|
terror (_("gdbm_setopt failed: %s"), gdbm_strerror (gdbm_errno));
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.20.1
|
||||||
|
|
||||||
@ -1,12 +1,14 @@
|
|||||||
Name: gdbm
|
Name: gdbm
|
||||||
Version: 1.18.1
|
Version: 1.18.1
|
||||||
Release: 2
|
Release: 3
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Summary: A library of database functions that work similar to the standard UNIX dbm
|
Summary: A library of database functions that work similar to the standard UNIX dbm
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
URL: http://www.gnu.org/software/gdbm/
|
URL: http://www.gnu.org/software/gdbm/
|
||||||
Source0: http://ftp.gnu.org/gnu/gdbm/gdbm-%{version}.tar.gz
|
Source0: http://ftp.gnu.org/gnu/gdbm/gdbm-%{version}.tar.gz
|
||||||
|
|
||||||
|
Patch0: Fix-gdbmtool-import-command.patch
|
||||||
|
|
||||||
BuildRequires: gcc libtool gettext readline-devel git
|
BuildRequires: gcc libtool gettext readline-devel git
|
||||||
|
|
||||||
Provides: %{name}-libs
|
Provides: %{name}-libs
|
||||||
@ -97,6 +99,9 @@ fi
|
|||||||
%{_infodir}/*.info*
|
%{_infodir}/*.info*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Nov 25 2021 yangchenguang <yangchenguang@uniontech.com> - 1.18.1-3
|
||||||
|
- Fix gdbmtool parm import error
|
||||||
|
|
||||||
* Fri Oct 29 2021 yanglongkang <yanglongkang@huawei.com> - 1.18.1-2
|
* Fri Oct 29 2021 yanglongkang <yanglongkang@huawei.com> - 1.18.1-2
|
||||||
- The devel package dependency is added to the devel package to resolve the installation error
|
- The devel package dependency is added to the devel package to resolve the installation error
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user