Text  |   XML   |   Visible Warnings:

Irssi : Irssi analysis 1 : Null Pointer Dereference  at irc-commands.c:320

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2170.2174
Procedure: cmd_names
Trace: View
Modified: Wed Sep 2 11:51:43 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/irc-commands.c
   Enter cmd_names
 303 static void cmd_names(const char *data, IRC_SERVER_REC *server,
 304                       WI_ITEM_REC *item) 
 305 {
 306         GHashTable *optlist;
 307         char *channel;
 308         void *free_arg;
 309  
 310         CMD_IRC_SERVER(server);
 311  
 312         if (!cmd_get_params(data, &free_arg, 1 | PARAM_FLAG_OPTIONS | 
 313                             PARAM_FLAG_GETREST, "names", &optlist, &channel))
 314                 return;
 315  
 316         if (strcmp(channel, "*") == 0 || *channel == '\0') {
 317                 if (!IS_IRC_CHANNEL(item))
 318                         cmd_param_error(CMDERR_NOT_JOINED);
 319  
true320                 channel = IRC_CHANNEL(item)->name;     /* Null Pointer Dereference */
Preconditions
$param_1 != 0
((char*)$param_2)[56] != 0
((char*)$param_3)[4] != *chat_protocols->data
$unknown_391812 = 0
strlen(&$unknown_391812) = 0
Postconditions
channel' = &$unknown_391812
data' = $param_1
item' = $param_3
server' = $param_2




Change Warning 2170.2174 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: