aboutsummaryrefslogtreecommitdiff
path: root/src/recover.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2018-07-02 19:46:24 +0300
committerSergey Poznyakoff <gray@gnu.org>2018-07-02 19:46:24 +0300
commitb4333893277f7e4e4b5e673c158cc8b68ce1ea93 (patch)
tree379eae4af3a8d9ade7c4bdff96430b65213ef1c8 /src/recover.c
parent030e685eb9df82f63d73a1bf206da84b7aa52374 (diff)
downloadgdbm-b4333893277f7e4e4b5e673c158cc8b68ce1ea93.tar.gz
gdbm-b4333893277f7e4e4b5e673c158cc8b68ce1ea93.tar.bz2
Bugfixes
* src/recover.c (backup_name): Fix memory overwrite. * src/gdbmtool.c (recover_handler): New option "force".
Diffstat (limited to 'src/recover.c')
-rw-r--r--src/recover.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/recover.c b/src/recover.c
index f6859ea..a64a1b4 100644
--- a/src/recover.c
+++ b/src/recover.c
@@ -52,7 +52,7 @@ backup_name (char const *name)
#define INITIAL_SUFFIX ".~1~"
- len = strlen (name + sizeof (INITIAL_SUFFIX));
+ len = strlen (name) + sizeof (INITIAL_SUFFIX);
buf = malloc (len);
if (!buf)
return NULL;

Return to:

Send suggestions and report system problems to the System administrator.