mirror of
https://git.savannah.gnu.org/git/gdbm.git
synced 2025-12-05 22:47:05 +00:00
No description
It had been reported that gdbm_load was unable to load ascii dumps that contain zero-length keys. Further investigation has shown that the same is true for binary dumps as well. This fix installs a workaround to handle such inputs, and fixes gdbm_dump to unambiguously delimit parameter blocks on the output. The modified ascii dump format is assigned version number 1.2. It is backward-compatible with 1.1, exept for the cases where the dump contains zero-length data. The exception does no harm, since prior gdbm versions are not able to handle such cases anyway. * src/gdbmdump.c (print_datum): Output empty comment for zero-length datum. (_gdbm_dump_ascii): Mark as version 1.2. * src/gdbmimp.c (gdbm_import_from_file): Don't attempt to read zero length data. * src/gdbmload.c (get_data): Skip leading comment lines. (get_parms): Stop reading if a comment is encountered. Special handling for duplicate "len" parameter. (read_record): Don't attempt to read zero length data. * tests/t_dumpload.c: Add new tests for zero-length k/v. * tests/emptydatum.at: New testcase. * tests/Makefile.am: Add new test. * tests/testsuite.at: Include new test. |
||
|---|---|---|
| compat | ||
| doc | ||
| fuzz | ||
| po | ||
| src | ||
| tests | ||
| tools | ||
| .gitignore | ||
| AUTHORS | ||
| bootstrap | ||
| ChangeLog.cvs | ||
| configure.ac | ||
| COPYING | ||
| Makefile.am | ||
| NEWS | ||
| NOTE-WARNING | ||
| README | ||
| README-alpha | ||
| README-hacking | ||
| THANKS | ||
GNU dbm README See the end of file for copying conditions. * Introduction This file contains brief information about configuring, testing and using GNU dbm. It is *not* intended as a replacement for the documentation, instead it is provided as a brief reference only. The complete documentation is available in doc/ subdirectory. To read the manpage without installing the package use `man doc/gdbm.3'. To read texinfo documentation without installing the package, run `info -f doc/gdbm.info'. After the package is installed the documentation can be accessed by running `man gdbm' and `info gdbm'. * Overview GNU dbm is a set of database routines that use extendable hashing and works similar to the standard UNIX dbm routines. The library provides also an optional compatibility layer for UNIX-like dbm and ndbm calls. * Configuration a) configure [PARAMETERS] b) make For a list of generic PARAMETERS, see the file INCLUDE. The gdbm-specific parameters are: ** --enable-memory-mapped-io Enable the use of mmap(2) for I/O optimizations. This is the default, if mmap is available. To disable mmap, use --disable-memory-mapped-io. ** --enable-libgdbm-compat Build and install libgdbm_compat, a compatibility layer which provides UNIX-like dbm and ndbm interfaces. It includes two header files: dbm.h and ndbm.h, which are installed into $includedir. If you wish to install them elsewhere, define the variable COMPATINCLUDEDIR, e.g. ./configure --enable-libgdbm-compat COMPATINCLUDEDIR=/usr/include/gdbm ** --without-readline Don't compile GNU Readline support. By default, configure enables line-editing support if GNU Readline is available on the system. ** --enable-gdbmtool-debug This option instruments gdbmtool for additional debugging. Configured with this option, gdbmtool accepts two additional arguments: --lex-trace, which enables tracing the operation of the lexical analyzer, and --gram-trace, which enables parser tracing output. Note, that bison and flex must be installed for this option to take effect, * Installation make install This package also contains the 'magic' file for the file(1) utility - src/gdbm.magic. It is not installed by default, as its installation location differs considerably between various distributions. The most straightforward (but not the best one) approach is appending its content to /etc/magic: cat src/gdbm.magic >> /etc/magic See the documentation in your distribution for detailed instructions on how to install this file. * Bug reporting Please report bugs via email to <bug-gdbm@gnu.org>. You can also use bug-tracker at <https://puszcza.gnu.org.ua/bugs/?group=gdbm>. * Documentation, updates etc. For the latest updates, visit <http://www.gnu.org/software/gdbm>, In particular, a copy of GDBM documentation in various formats is available online at <https://www.gnu.org/software/gdbm/manual>. Latest versions of GDBM can be downloaded from <https://ftp.gnu.org/gnu/gdbm>. You can also use anonymous fpt at the same location, if you prefer. To track the development, visit <http://puszcza.gnu.org.ua/projects/gdbm>. * Copyright information: Copyright (C) 2011-2025 Free Software Foundation, Inc. Permission is granted to anyone to make or distribute verbatim copies of this document as received, in any medium, provided that the copyright notice and this permission notice are preserved, thus giving the recipient permission to redistribute in turn. Permission is granted to distribute modified versions of this document, or of portions of it, under the above conditions, provided also that they carry prominent notices stating who last changed them. Local Variables: mode: outline paragraph-separate: "[ ]*$" version-control: never End: