Bug 750333 - [PATCH] fixes for buffer owerflow
Summary: [PATCH] fixes for buffer owerflow
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: duel3
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Hans de Goede
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-31 18:28 UTC by Igor Vlasenko
Modified: 2012-03-09 04:56 UTC (History)
2 users (show)

Fixed In Version: duel3-0.1-0.12.20060225.fc17
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-09 04:56:12 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
proposed patch to fix buffer overflows. (579 bytes, patch)
2011-10-31 18:28 UTC, Igor Vlasenko
no flags Details | Diff

Description Igor Vlasenko 2011-10-31 18:28:04 UTC
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.

Comment 1 Hans de Goede 2011-11-01 12:58:49 UTC
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.

Comment 2 Igor Vlasenko 2011-11-01 13:16:10 UTC
When I compiled it with -O0, the bug disappeared, so it might be a compiler issue.
Sorry I did not investigate it further.

Comment 3 Fedora Update System 2012-03-03 09:08:49 UTC
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

Comment 4 Fedora Update System 2012-03-05 20:59:22 UTC
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).

Comment 5 Fedora Update System 2012-03-09 04:56:12 UTC
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.


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