Bug 981060 - Bad coverity patch
Bad coverity patch
Product: Fedora
Classification: Fedora
Component: unixODBC (Show other bugs)
Unspecified Unspecified
unspecified Severity high
: ---
: ---
Assigned To: Honza Horak
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-07-03 18:23 EDT by Sam Varshavchik
Modified: 2013-07-15 21:45 EDT (History)
1 user (show)

See Also:
Fixed In Version: unixODBC-2.3.1-6.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-07-15 21:45:56 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Sam Varshavchik 2013-07-03 18:23:34 EDT
Description of problem:

coverity-fixes.patch broke SQLGetCursorName() and SQLGetCursorNameW().

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Use SQLGetCursorName(), as documented in ODBC API

Actual results:

The function call always fails.

Expected results:

Should not fail.

Additional info:

The following patch was applied to both SQLGetCursorName() and SQLGetCursorNameW().

-    if ( !buffer_length < 0 )
+    if ( !(buffer_length < 0) )

The correct fix that should've been applied (in both cases):

-    if ( !buffer_length < 0 )
+    if ( buffer_length < 0 )

This is obvious just by looking at the code. It should be erroring out when the output buffer size parameter value is negative (zero value is permissible, according to ODBC documentation).
Comment 1 Honza Horak 2013-07-04 06:03:34 EDT
Thanks for reporting, really a silly mistake, I'll fix in a minute.
Comment 2 Fedora Update System 2013-07-04 08:20:44 EDT
unixODBC-2.3.1-6.fc19 has been submitted as an update for Fedora 19.
Comment 3 Fedora Update System 2013-07-04 21:54:43 EDT
Package unixODBC-2.3.1-6.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing unixODBC-2.3.1-6.fc19'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 4 Fedora Update System 2013-07-15 21:45:56 EDT
unixODBC-2.3.1-6.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.