~vcs-imports-ii/gdbm/master

Viewing all changes in revision 311.

  • Committer: Sergey Poznyakoff
  • Date: 2018-10-18 14:23:07 UTC
  • Revision ID: git-v1:852ff1b6e81ce13fdcd1fd4fb272b17d760760b3
Attempt recovery in case of invalid next_block header field

* src/gdbmopen.c (validate_header): Return GDBM_NEED_RECOVERY
if next_block is invalid.
(_gdbm_validate_header): New function.
(gdbm_fd_open): Set need_recovery depending on return from validate_header.
(gdbm_open): Bail out on invalid value of GDBM_OPENMASK bits.
* src/proto.h (_gdbm_validate_header): New proto.
* src/recover.c (check_db): Re-validate the header.
* src/gdbmtool.c (export_handler): Fix option processing.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: