Bug 981060 - Bad coverity patch
Summary: Bad coverity patch
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: unixODBC
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Honza Horak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-07-03 22:23 UTC by Sam Varshavchik
Modified: 2013-07-16 01:45 UTC (History)
1 user (show)

Fixed In Version: unixODBC-2.3.1-6.fc19
Clone Of:
Environment:
Last Closed: 2013-07-16 01:45:56 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Sam Varshavchik 2013-07-03 22:23:34 UTC
Description of problem:

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

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

unixODBC-2.3.1-4.fc19

How reproducible:

Always

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 10:03:34 UTC
Thanks for reporting, really a silly mistake, I'll fix in a minute.

Comment 2 Fedora Update System 2013-07-04 12:20:44 UTC
unixODBC-2.3.1-6.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/unixODBC-2.3.1-6.fc19

Comment 3 Fedora Update System 2013-07-05 01:54:43 UTC
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:
https://admin.fedoraproject.org/updates/FEDORA-2013-12307/unixODBC-2.3.1-6.fc19
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2013-07-16 01:45:56 UTC
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.