[Mono-bugs] [Bug 656833] New: OdbcParameter.Bind() can pass a NULL pointer to SQLBindParameter
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Dec 1 12:13:31 EST 2010
https://bugzilla.novell.com/show_bug.cgi?id=656833
https://bugzilla.novell.com/show_bug.cgi?id=656833#c0
Summary: OdbcParameter.Bind() can pass a NULL pointer to
SQLBindParameter
Classification: Mono
Product: Mono: Class Libraries
Version: SVN
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Sys.Data
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: Richard.Kettlewell at thales-esecurity.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/534.7
(KHTML, like Gecko) Chrome/7.0.517.44 Safari/534.7
I found that when I supplied a zero-length value to OdbcParameter, the
zero-length internal copy of it would be allocated as a null pointer which was
subsequently passed to SQLBindParameter.
The driver we are using rejects this. (I guess some drivers are more
forgiving, although the MSDN documentation for SQLBindParameter does explicitly
mention a NULL parameter value pointer as a reason for returning an error.)
As a quick fix, I made OdbcParameter.AllocateBuffer check for a size of 0 and
use 1 instead.
Reproducible: Always
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the mono-bugs
mailing list