Details
-
Bug
-
Resolution: Fixed
-
Trivial
-
None
-
Security Level: Public
-
None
Description
fatbuf_get incorrectly logs a warning (in debug builds) during a couchstore_open_local_document call for a document whose value size is zero.
frame #0: 0x00000001007d3550 libcouchstore.dylib`fatbuf_get + 96 at util.c:63
frame #1: 0x00000001007cf240 libcouchstore.dylib`local_doc_fetch + 224 at couch_db.c:850
frame #2: 0x00000001007ccde9 libcouchstore.dylib`btree_lookup_inner + 1033 at btree_read.c:68
frame #3: 0x00000001007cc9d4 libcouchstore.dylib`btree_lookup + 52 at btree_read.c:92
frame #4: 0x00000001007cf110 libcouchstore.dylib`couchstore_open_local_document + 176 at couch_db.c:889
It shouldn't be checking the first byte of the allocated space if the allocation size is zero.