Text  |   XML   |   Visible Warnings:

Irssi : Irssi analysis 1 : Null Pointer Dereference  at commands.c:677

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2085.2085
Procedure: get_optional_channel
Trace: View
Modified: Wed Sep 2 11:51:06 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/core/commands.c
   Enter get_optional_channel
 662 static const char * 
 663 get_optional_channel(WI_ITEM_REC *active_item, char **data, int require_name) 
 664 {
 665         CHANNEL_REC *chanrec;
 666         const char *ret;
 667         char *tmp, *origtmp, *channel;
 668  
 669         if (active_item == NULL) {
 670                 /* no active channel in window, channel required */ 
 671                 return cmd_get_param(data);
 672         }
 673  
 674         origtmp = tmp = g_strdup(*data);
true675         channel = cmd_get_param(&tmp);
 676  
channel <= 4095677         if (strcmp(channel, "*") == 0 && !require_name) {     /* Null Pointer Dereference */
Preconditions
$param_1 != 0
Postconditions
active_item' = $param_1
channel' = 0
data' = $param_2
origtmp' = 0
require_name' = $param_3
tmp' = 0




Change Warning 2085.2085 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: