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: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to