Opened 15 years ago
Closed 15 years ago
#415 closed defect (fixed)
get_document() on an empty database raises floating point exception
Reported by: | Richard Boulton | Owned by: | Olly Betts |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.18 |
Component: | Library API | Version: | SVN trunk |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Operating System: | All |
Description
By empty, I mean a Database object uninitialised with any concrete databases.
Example code in python:
import xapian db=xapian.Database() db.get_document (1)
I would expect a DocNotFound exception.
Change History (3)
comment:1 by , 15 years ago
Component: | Other → Library API |
---|---|
Milestone: | → 1.1.4 |
comment:2 by , 15 years ago
Milestone: | 1.1.4 → 1.0.18 |
---|---|
Status: | new → assigned |
Note:
See TracTickets
for help on using tickets.
This is because we don't check internal.size() and then proceed to divide and modulus by 0.
In fact many methods of Xapian::Database currently fail to check this...
We should fix this before 1.1.4 - it's not showstopper bug, but it's easy to fix and low risk.