Re: [PATCH] issue #2979: SVNAdmin::load passes a null data buffer
On Tue, Aug 4, 2009 at 2:08 PM, Dave Brown<dave.brown_at_wandisco.com> wrote:
> Fix issue #2979: javahl's SVNAdmin::load() sometimes passes a null data
> to the read() method of the caller's InputInterface. JNIUtil::makeByteArray
> was returning NULL when the requested byte length was 0. This in turn was
> provoked by a read(length=0) on the svn_stream_t loading a repository dump.
> read(0) is perfectly valid (albeit superfluous), such as when parsing a
> property value with length zero.
> The fix just returns a byte with length 0 as requested from JNIUtil.cpp.
> (testLoadRepo): Added test for issue 2979
> (testSetRevProp): Improved test, made it actually verify things
> (OneTest): Tweaked inner class optionally not to load sample files into
> the test repository. Keep behavior expected by existing tests.
> * subversion/bindings/javahl/tests/data/issue2979.dump
> Data for reproducible test case of issue #2979. 1400 bytes on disk. If
> there's an objection to checking in test data as a separate file, I could
> boil down a smaller bit of repro data in a String literal in the test
> I really just need a zero-length prop value in a dump file.
> * subversion/bindings/javahl/native/JNIUtil.cpp
> (makeJByteArray) Do not treat byte and NULL as equivalent.
There was an unrelated test improvement included in this patch
(testSetRevProp). I committed it separately in r38753 with just some
The rest was committed in r38754 with formatting corrections.
Received on 2009-08-05 22:11:48 CEST
This is an archived mail posted to the Subversion Dev