bugGNU shogi - Bugs: bug #31475, Buffer overflow

 
 

bug #31475: Buffer overflow

Submitted by:  Tupone Alfredo <atupone>
Submitted on:  Wed 27 Oct 2010 09:24:58 AM UTC  
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 03 Oct 2013 11:36:13 PM UTC, comment #1:

A fix has been integrated in git master at 038b16407dd.

Yann Dirson <ydirson>
Project Administrator
Wed 27 Oct 2010 09:24:58 AM UTC, original submission:

gcc-4.5 signal a possible buffer overflow.
This is a patch that should fix it. Hope it helps.
Regards

--- gnushogi/commondsp.c.old 2010-10-27 11:16:24.000000000 +0200
+++ gnushogi/commondsp.c 2010-10-27 11:17:55.000000000 +0200
@@ -1737,7 +1737,7 @@
s[0] = sx[0] = '\0';

while(!sx[0])
- (void)fgets(sx, 256, stdin);
+ (void)fgets(sx, 80, stdin);
}
else
{

Tupone Alfredo <atupone>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ydirson (Posted a comment)
  • -email is unavailable- added by atupone (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-10-03 ydirson StatusNone => Fixed

    Back to the top


    Powered by Savane 3.3