Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1696458
Summary: | PString Mid() fails due to gcc signed int overflow optimization breaking Ekiga | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Krzysztof Halasa <khalasa> |
Component: | ptlib | Assignee: | Peter Robinson <pbrobinson> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 29 | CC: | jwakely, pbrobinson, redhat-bugzilla, veillard |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | ptlib-2.10.11-3.fc30 | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2019-05-30 12:51:34 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Krzysztof Halasa
2019-04-04 21:29:43 UTC
Could you try to replace > if (start+len < start) // Beware of wraparound by > if (len == P_MAX_INDEX || start+len < start) // If open ended or check for wraparound and test whether it works? Or change it to 'if (start > INT_MAX - len)' Oh but it's not an int. So then: if (start > std::numeric_limits<PINDEX>::max() - len) Both first if (len == P_MAX_INDEX || start+len < start) // If open ended or check for wraparound and the second #include <limits> if (start > std::numeric_limits<PINDEX>::max() - len) work. OTOH I'm not sure the first test is entirely valid in case of a generic library like this. len can be a bit less than P_MAX_INDEX (it's just an arbitrary limit) and still cause the "start + len - 1" to fail. The second test guarantees that start <= max - len and thus start + len - 1 < max. Thanks for looking into this. My suggestion in comment #2 is simply from what latest upstream uses. If we need to propose something better to upstream, I would need your help in order to do so. Sorry, I meant comment #1 rather comment #2. ekiga-4.0.1-44.fc30 ptlib-2.10.11-3.fc30 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-c5e3dc44ba Right. I just wasn't aware that the ptlib version used by Ekiga is 7+ years old. ekiga-4.0.1-44.fc30, ptlib-2.10.11-3.fc30 has been pushed to the Fedora 30 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-2019-c5e3dc44ba ekiga-4.0.1-44.fc30, ptlib-2.10.11-3.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report. |