bugGNU Screen - Bugs: bug #35277, gcc -Wall found some serious bugs...

 
 

bug #35277: gcc -Wall found some serious bugs in the source code

Submitted by:  None
Submitted on:  Tue 10 Jan 2012 01:20:39 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: OpenRelease: Cur Dev Sources
Fixed Release: NonePlanned Release: None
Work Required: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Mon 27 Feb 2012 01:31:57 PM UTC, comment #1:

Please mark this bug as closed.

amade's patch from 27/01/2012 (Subject in screen-devel: -Wall warnings fixes patch) fixed it.

Regards, Tim

Tim Ruehsen <rockdaboot>
Tue 10 Jan 2012 01:20:39 PM UTC, original submission:

I just compiled screen (4.1.0 20110819) with gcc -Wall and discovered some issues:

1. ansi.c / DoCSI()

curr->w_charsets[0] = curr->w_charsets[1] =
curr->w_charsets[2] = curr->w_charsets[2] =
curr->w_FontL = curr->w_FontR = ASCII;

IMHO should be

curr->w_charsets[0] = curr->w_charsets[1] =
curr->w_charsets[2] = curr->w_charsets[3] =
curr->w_FontL = curr->w_FontR = ASCII;

2. mark.c / nextchar()
local variable 'step' isn't initialized for case 't' and 'T'.
this could lead from infinite loop to random behaviour.

3. window.c / RemakeWindow()
the local variable 'f' isn't initialized if BUILDIN_TELNET is defined.
this could result in read from / write into a random file descriptor.

4. list_display.c / gl_Display_footer()
the function does not have a return statement, resulting in always returning 0. this prevents gl_Display_rebuild(ldata) being called.

5. list_window.c / gl_Window_input()
return should return a value here:
if (display && AclCheckPermWin(D_user, ACL_READ, win))
return; /* Not allowed to switch to this window. */

Thanks for listening.

Tim Ruehsen

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rockdaboot (Posted a comment)
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup