Bug 1570037 - Backport upstream Coverity fixes
Summary: Backport upstream Coverity fixes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: swig
Version: 28
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
Assignee: Jitka Plesnikova
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-20 13:28 UTC by Steve Grubb
Modified: 2018-05-11 11:10 UTC (History)
4 users (show)

Fixed In Version: swig-3.0.12-17.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-05-04 05:48:06 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Steve Grubb 2018-04-20 13:28:05 UTC
Description of problem:
It appears that the upstream developers have been responding to reports of warnings and bugs caused by swig that are found by Coverity. You can see a list here:

https://github.com/swig/swig/search?q=%5BCoverity%5D&type=Commits

What I would like to ask is that 4 of the patches be considered for backport to the current version so that code that depends on swig to generate bindings in other languages (python in particular) pass Coverity scans with less warnings and bugs as the case may be.

The patches are:

https://github.com/swig/swig/commit/9825fcbab5c4ddd867432f9922bebfbec7b78af0
This ^^ appears to be safe. It switches out a strnlen for a memcpy.

https://github.com/swig/swig/commit/5803e81d488e97623fe29b8629b977be01a8229e
This ^^ is another simple fix. It adds a check for the string end

https://github.com/swig/swig/commit/13eeebd2fb3005abc876957c68bde6a92510aa44
This ^^ appears to fix a bug reported by Coverity where the bindings could cause the app to segfault on a NULL pointer dereference.

https://github.com/swig/swig/commit/21f532975f59f0c156c76cc739f5a93f57d8f6cb
This ^^ appears to fix a bug where the control flow cannot reach a line of code. This usually means a logic fault.

What do you think?

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

Comment 1 Jitka Plesnikova 2018-04-25 07:24:39 UTC
I'll apply the patches. I tried to use them and all upstream tests passed.

Comment 2 Fedora Update System 2018-04-25 13:47:35 UTC
swig-3.0.12-17.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-48e225b5f5

Comment 3 Fedora Update System 2018-04-26 04:53:20 UTC
swig-3.0.12-17.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-48e225b5f5

Comment 4 Fedora Update System 2018-05-03 15:26:15 UTC
swig-3.0.12-17.fc28 has been pushed to the Fedora 28 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.