[pkg-db-devel] Bug#650844: libdb5.1-java: cursor reads do not allocate new buffer as specified in documentation leading to misread data
Alex Roper
aroper at umich.edu
Sat Dec 3 21:13:38 UTC 2011
Package: libdb5.1-java
Version: 5.1.25-11
Severity: important
The documentation for DatabaseEntry class specifies that whenever a
DatabaseEntry is used as an output parameter, a new buffer will be
allocated to hold the result read from the database, and therefore it is
safe to keep handles to it.
Currently, (when using a cursor at least), the old buffer is not only
clobbered, it is not cleared first, so if the previous value read is
larger than the current one read, you will get a mixup of the two.
See attached sample code for demonstration of this: run Setup to
initialize a test btree, then run Good to see what should be read and
Bad to see what is read due to this bug.
Dear Maintainer,
*** Please consider answering these questions, where appropiate ***
* What led up to the situation?
* What exactly did you do (or not do) that was effective (or
ineffective)?
* What was the outcome of this action?
* What outcome did you expect instead?
*** End of the template - remove these lines ***
-- System Information:
Debian Release: wheezy/sid
APT prefers testing-proposed-updates
APT policy: (500, 'testing-proposed-updates'), (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 3.0.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages libdb5.1-java depends on:
ii libc6 2.13-21
ii libdb5.1 5.1.25-11
ii multiarch-support 2.13-21
Versions of packages libdb5.1-java recommends:
ii libdb5.1-java-gcj 5.1.25-11
libdb5.1-java suggests no packages.
-- no debconf information
More information about the pkg-db-devel
mailing list