[Xapian-tickets] [Xapian] #46: zero byte cleanliness in C# and Java bindings
Xapian
nobody at xapian.org
Fri Jul 15 05:53:21 BST 2011
#46: zero byte cleanliness in C# and Java bindings
-----------------------------+----------------------------------------------
Reporter: olly | Owner: olly
Type: defect | Status: assigned
Priority: normal | Milestone: 1.2.x
Component: Xapian-bindings | Version: SVN trunk
Severity: minor | Resolution:
Keywords: | Blockedby:
Platform: All | Blocking:
-----------------------------+----------------------------------------------
Old description:
> Check for zero byte cleanness wherever strings are used. There are a
> number of c_str()s in the code, but I believe all in the core library
> are harmless at 2002-04-29. There may be other zero
> byte issues though. xapian-applications/dbtools also uses c_str() where
> it
> should probably use data() and length(). xapian-bindings hasn't been
> checked.
New description:
Current status:
Java (SWIG-based): \0 in Java -> \xc0\x80 in Xapian, which seems to
disappear from the returned string on output
Tcl: \0 in Tcl -> \xc0\x80 in Xapian, which reappears as \0 in Tcl on when
returned
C#: Truncates at \0 on input
----
''Original description:''
Check for zero byte cleanness wherever strings are used. There are a
number of c_str()s in the code, but I believe all in the core library
are harmless at 2002-04-29. There may be other zero
byte issues though. xapian-applications/dbtools also uses c_str() where
it
should probably use data() and length(). xapian-bindings hasn't been
checked.
--
Comment(by olly):
SWIG-based Java isn't zero byte clean, but looking at the JNI methods
used, I don't think the hand-coded JNI actually was on input (despite my
comment above about it being so in 1.0.7).
Updated description with current status.
--
Ticket URL: <http://trac.xapian.org/ticket/46#comment:20>
Xapian <http://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list