bugGNU shogi - Bugs: bug #31475, Buffer overflow

 
 

bug #31475: Buffer overflow

Submitter:  Tupone Alfredo <atupone>
Submitted:  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
* Mandatory Fields

Add a New Comment Rich Markup
   

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

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

Yann Dirson <ydirson>
Group 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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    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.13-4448.
    Corresponding source code