diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2018-07-02 19:46:24 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2018-07-02 19:46:24 +0300 |
commit | b4333893277f7e4e4b5e673c158cc8b68ce1ea93 (patch) | |
tree | 379eae4af3a8d9ade7c4bdff96430b65213ef1c8 /src/recover.c | |
parent | 030e685eb9df82f63d73a1bf206da84b7aa52374 (diff) | |
download | gdbm-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.c | 2 |
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; |