aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2018-05-30 11:01:00 +0300
committerSergey Poznyakoff <gray@gnu.org>2018-05-30 11:01:00 +0300
commit07caec236e3af48973874f2c0e19bafec4d13f78 (patch)
tree924aa3e863ec347adbb23ab79ae5bfc2a63a422d /src
parented14564822983b6b7cfa7b3c7d8104b15a019255 (diff)
downloadgdbm-07caec236e3af48973874f2c0e19bafec4d13f78.tar.gz
gdbm-07caec236e3af48973874f2c0e19bafec4d13f78.tar.bz2
gdbmtool: bugfixes
* src/gdbmtool.c (print_bucket_begin): Check return value from _gdbm_get_bucket. (source_handler): Don't gtry to push NULL stream.
Diffstat (limited to 'src')
-rw-r--r--src/gdbmtool.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gdbmtool.c b/src/gdbmtool.c
index 46e3555..11b6f20 100644
--- a/src/gdbmtool.c
+++ b/src/gdbmtool.c
@@ -755,3 +755,7 @@ print_bucket_begin (struct handler_param *param, size_t *exp_count)
}
- _gdbm_get_bucket (gdbm_file, temp);
+ if (_gdbm_get_bucket (gdbm_file, temp))
+ {
+ terror ("%s", gdbm_db_strerror (gdbm_file));
+ return 1;
+ }
if (exp_count)
@@ -1134,3 +1138,3 @@ source_handler (struct handler_param *param)
free (fname);
- if (input_context_push (istr) == 0)
+ if (istr && input_context_push (istr) == 0)
yyparse ();

Return to:

Send suggestions and report system problems to the System administrator.