Text  |   XML   |   Visible Warnings:

irssi-0.8.14 : irssi-0.8.14 analysis 2 : Null Pointer Dereference  at formats.c:892

Categories: LANG.MEM.NPD CWE:476
Warning ID: 7298.28387
Procedure: strip_codes
Trace: view
Modified: Thu Nov 26 11:09:16 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
   /kat0/fletcher/SATE/2010/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);
     /kat0/fletcher/SATE/2010/irssi-0.8.14/src/fe-common/core/formats.c
     Enter display_sorted_nicks / strip_codes
 886   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: 7404.28503) */
     Exit display_sorted_nicks / strip_codes
Preconditions
input[16] >= 0
Postconditions
format' = 0
input' = 0
nickmode[0]' = 0
strlen(&nickmode[0])' = 0
nickmode[1]' = 0
p' = 0
str' = out'




Change Warning 7298.28387 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: