summaryrefslogtreecommitdiffstats
path: root/dbm.c
Commit message (Collapse)AuthorAgeFilesLines
* Correctly construct empty lists in dbm_page_get().Ingo Schwarze2018-11-191-3/+3
| | | | | | | | | | Original commit message by the author of this bugfix patch, bluhm@: lstmatch() expects a list of strings separated by \0 and terminated with \0\0. In the NULL case dbm_page_get() returned only simple strings so correct processing was depending on data layout. Use an additional \0 to terminate the single string lists. Found by mandoc regress since llvm linker on amd64 arranges strings differently.
* The termination condition of the iteration logic in page_bymacro()Ingo Schwarze2016-10-181-18/+22
| | | | | | | was overzealous. Consequently, macro=substr and macro~regexp searches only returned all pages containing the first matching macro value, rather than all pages containing any of the matching macro values. Bug reported by tb@ - thanks!
* When the database is corrupt in the sense of containing invalidIngo Schwarze2016-08-301-1/+15
| | | | | | | | | pointers in the pages table, do not access NULL pointers, but gracefully handle the errors. Similar patches will be needed for the macro tables, too. <attila at stalphonsos dot com> audited the code and pointed out to me that dbm_get() can return NULL for corrupted databases, but that isn't handled properly at various places.
* The concept of endianness seems to be somewhat newfangled, so theIngo Schwarze2016-08-051-0/+6
| | | | | | respective conversion functions are not yet properly standardized. Rumour has it that POSIX is working on it, though. For now, sprinkle some configuration glue.
* Linux compatibility: Work around the lack of EFTYPE and protect <err.h>.Ingo Schwarze2016-07-201-0/+4
|
* Remove the dependency on SQLite without loss of functionality.Ingo Schwarze2016-07-191-0/+452
Stop supporting systems that don't have mmap(3). Drop the obsolete names_check() now that we deleted MLINKS.