Text  |   XML   |   Visible Warnings:

Irssi : Irssi analysis 1 : Null Pointer Dereference  at modes.c:355

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2158.2161
Procedure: parse_channel_modes
Trace: View
Modified: Wed Sep 2 11:51:38 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/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
$param_3 != 0
$param_4 = 0
Postconditions
_g_boolean_var_' = 1
_g_boolean_var_' = 1
channel' = $param_1
curmode' = 0
dup' = 0
mode' = $param_3
modestr' = 0
server' = ((char*)$param_1)[24]
setby' = $param_2
type' = 43
update_key' = $param_4




Change Warning 2158.2161 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: