BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000600 [BusyBox] Other crash always 12-15-05 03:27 12-16-05 00:02
Reporter iggarpe View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version svn
Summary 0000600: less segfaults if controlling terminal cannot be open
Description If the controlling terminal cannot be open, less segfaults. Not being able to open the controlling terminal is certainly an error condition by itself, but less should at least print an error message and exit gracefully instead of segfaulting.

The cause is that there is no error check in the open(CURRENT_TTY) call, which later leads to fileno(inp) segfault since inp == NULL.

Attached patch checks inp == NULL after the open call, prints an error, and dies.
Additional Information
Attached Files  less.diff [^] (375 bytes) 12-15-05 03:27

- Relationships

- Notes
(0000785)
vodz
12-15-05 03:55

Ok. I change fopen() to bb_xfopen() for this.
 
(0000787)
landley
12-16-05 00:02

svn 12923
 

- Issue History
Date Modified Username Field Change
12-15-05 03:27 iggarpe New Issue
12-15-05 03:27 iggarpe Status new => assigned
12-15-05 03:27 iggarpe Assigned To  => BusyBox
12-15-05 03:27 iggarpe File Added: less.diff
12-15-05 03:55 vodz Note Added: 0000785
12-16-05 00:02 landley Status assigned => closed
12-16-05 00:02 landley Note Added: 0000787
12-16-05 00:02 landley Resolution open => fixed
12-16-05 00:02 landley Fixed in Version  => svn


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker