Text  |   XML   |   Visible Warnings:

Irssi : Irssi analysis 1 : Negative file descriptor  at rawlog.c:150

Categories: POSIX.IO.NEGFD
Warning ID: 2133.2135
Procedure: rawlog_save
Trace: View
Modified: Wed Sep 2 11:51:27 2009   show details
 
Priority: None
State: None
Finding: None
Owner: None
  edit properties

Legend [ X ]
Warning Location
Contributes
Parse Error
Other Warning
Two or More Loop Iterations
On Execution Path
Comment
Macro
Preprocessor
Include
Keyword
Preprocessed Away

Source  |  Language: C Hide Legend     
ProblemLineSource
   /u1/paul/SATE/2010/c/irssi/irssi-0.8.14/src/core/rawlog.c
   Enter rawlog_save
 140 void rawlog_save(RAWLOG_REC *rawlog, const char *fname) 
 141 {
 142         char *path;
 143         int f;
 144  
 145         path = convert_home(fname);
true146         f = open(path, O_WRONLY | O_APPEND | O_CREAT, log_file_create_mode);
 147         g_free(path);
 148  
 149         rawlog_dump(rawlog, f);
f <= -1150         close(f);     /* Negative file descriptor */
Preconditions
((char*)$param_2)[1] <= 47
((char*)$param_2)[1] >= 0
*$param_2 = 126
strlen($param_2) != 0
Postconditions
$unknown_183534' is opened
f' = -1
fname' = $param_2
path' = &$unknown_183534
rawlog' = $param_1




Change Warning 2133.2135 : Negative file descriptor

Priority:
State:
Finding:
Owner:
Note: