Bug 750333
Summary: | [PATCH] fixes for buffer owerflow | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Igor Vlasenko <viy> | ||||
Component: | duel3 | Assignee: | Hans de Goede <hdegoede> | ||||
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | rawhide | CC: | bruno, hdegoede | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | duel3-0.1-0.12.20060225.fc17 | Doc Type: | Bug Fix | ||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2012-03-09 04:56:12 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Thanks for the patch, although the patch certainly would fix the buffer overflows I wonder if you've tried to figure out what is causing the initial garbage values for shield and armor health? Making sure those always have a sane value seems like a better fix to me. When I compiled it with -O0, the bug disappeared, so it might be a compiler issue. Sorry I did not investigate it further. duel3-0.1-0.12.20060225.fc17 has been submitted as an update for Fedora 17. https://admin.fedoraproject.org/updates/duel3-0.1-0.12.20060225.fc17 Package duel3-0.1-0.12.20060225.fc17: * should fix your issue, * was pushed to the Fedora 17 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing duel3-0.1-0.12.20060225.fc17' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2012-2942/duel3-0.1-0.12.20060225.fc17 then log in and leave karma (feedback). duel3-0.1-0.12.20060225.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report. |
Created attachment 531010 [details] proposed patch to fix buffer overflows. There are buffer overflows with -O2 optimizations due to the fact that at the start of the game there is sometimes initial garbage and sprintf'ing it overflows buffers and causes segfault. proposed patch use snprintf to fix those buffer overflows.