Text  |   XML   |   Visible Warnings:

Irssi : Irssi analysis 1 : Null Pointer Dereference  at keyboard.c:714

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2263.2269
Procedure: cmd_bind
Trace: View
Modified: Wed Sep 2 11:55:14 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/fe-common/core/keyboard.c
   Enter cmd_bind
 676 static void cmd_bind(const char *data) 
 677 {
 678         GHashTable *optlist;
 679         char *key, *id, *keydata;
 680         void *free_arg;
 681         int command_id;
 682  
 683         if (!cmd_get_params(data, &free_arg, 3 | PARAM_FLAG_GETREST | PARAM_FLAG_OPTIONS,
 684                             "bind", &optlist, &key, &id, &keydata))
 685                 return;
 686  
 687         if (g_hash_table_lookup(optlist, "list")) {
 688                 GSList *tmp;
 689  
 690                 for (tmp = keyinfos; tmp != NULL; tmp = tmp->next) {
 691                         KEYINFO_REC *rec = tmp->data;
 692  
 693                         printformat(NULL, NULL, MSGLEVEL_CLIENTCRAP, TXT_BIND_COMMAND_LIST,
 694                                     rec->id, rec->description ? rec->description : "");
 695                 }
 696                 cmd_params_free(free_arg);
 697                 return;
 698         }
 699  
 700         if (*key != '\0' && g_hash_table_lookup(optlist, "delete")) {
 701                 /* delete key */ 
 702                 key_configure_remove(key);
 703                 cmd_params_free(free_arg);
 704                 return;
 705         }
 706  
 707         if (*id == '\0') {
 708                 /* show some/all keys */ 
 709                 cmd_show_keys(key, FALSE);
 710                 cmd_params_free(free_arg);
 711                 return;
 712         }
 713  
true714         command_id = strchr(settings_get_str("cmdchars"), *id) != NULL;     /* Null Pointer Dereference */
Preconditions
$param_1 != 0
$unknown_906229 != 0
strlen(&$unknown_906229) != 0
$unknown_906230 != 0
strlen(&$unknown_906230) != 0
Postconditions
data' = $param_1
id' = &$unknown_906230
key' = &$unknown_906229
optlist' = &$unknown_906228




Change Warning 2263.2269 : Null Pointer Dereference

Priority:
State:
Finding:
Owner:
Note: