Text  |   XML   |   Visible Warnings:

Irssi : Irssi analysis 1 : Null Pointer Dereference  at formats.c:892

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2234.2240
Procedure: strip_codes
Trace: View
Modified: Wed Sep 2 11:53:39 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/fe-common/core/fe-channels.c
   Enter display_sorted_nicks
 328 static void display_sorted_nicks(CHANNEL_REC *channel, GSList *nicklist) 
 329 {
 330         WINDOW_REC *window;
 331         TEXT_DEST_REC dest;
 332         GString *str;
 333         GSList *tmp;
 334         char *format, *stripped, *prefix_format;
 335         char *linebuf, nickmode[2] = { 0, 0 };
 336         int *columns, cols, rows, last_col_rows, col, row, max_width;
 337         int item_extra, linebuf_size, formatnum;
 338  
 339         window = window_find_closest(channel->server, channel->visible_name,
 340                                      MSGLEVEL_CLIENTCRAP);
 341         max_width = window->width;
 342  
 343         /* get the length of item extra stuff ("[ ] ") */ 
 344         format = format_get_text(MODULE_NAME, NULL,
 345                                  channel->server, channel->visible_name,
true346                                  TXT_NAMES_NICK, " ", "");
format <= 4095347         stripped = strip_codes(format);
     /u1/paul/SATE/2010/c/irssi/irssi-0.8.14/src/fe-common/core/formats.c
     Enter display_sorted_nicks / strip_codes
$param_1 <= 4095886   char *strip_codes(const char *input) 
 887   {
 888           const char *p;
 889           char *str, *out;
 890    
 891           out = str = g_strdup(input);
input <= 4095892           for (p = input; *p != '\0'; p++) {     /* Null Pointer Dereference */  /* Null Pointer Dereference (ID: 2342.2352) */
     Exit display_sorted_nicks / strip_codes
Preconditions
&$unknown_653980 = 0
((char*)$param_1)[24] >= 0
Postconditions
channel' = $param_1
format' = 0
input' = 0
nicklist' = $param_2
nickmode[0]' = 0
strlen(&nickmode[0])' = 0
nickmode[1]' = 0
p' = 0
str' = out'




Change Warning 2234.2240 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: