Text  |   XML   |   Visible Warnings:

irssi-0.8.14 : irssi-0.8.14 analysis 2 : Null Pointer Dereference  at modes.c:355

Categories: LANG.MEM.NPD CWE:476
Warning ID: 6939.28304
Procedure: parse_channel_modes
Trace: view
Modified: Thu Nov 26 11:08:36 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/irc/core/modes.c
   Enter parse_channel_modes
 338 void parse_channel_modes(IRC_CHANNEL_REC *channel, const char *setby,
 339                          const char *mode, int update_key) 
 340 {
 341         IRC_SERVER_REC *server = channel->server;
 342         GString *newmode;
 343         char *dup, *modestr, *arg, *curmode, type, *old_key;
 344         int umode;
 345  
 346         g_return_if_fail(IS_IRC_CHANNEL(channel));
 347         g_return_if_fail(mode != NULL);
 348  
 349         type = '+';
 350         newmode = g_string_new(channel->mode);
 351         old_key = update_key ? NULL : g_strdup(channel->key);
 352  
 353         dup = modestr = g_strdup(mode);
true354         curmode = cmd_get_param(&modestr);
curmode <= 4095355         while (*curmode != '\0') {     /* Null Pointer Dereference */
Preconditions
mode != 0
update_key = 0
Postconditions
_g_boolean_var_' = 1
_g_boolean_var_' = 1
curmode' = 0
dup' = 0
modestr' = 0
server' = channel->server
type' = 43




Change Warning 6939.28304 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: