Text  |   XML   |   Visible Warnings:

irssi-0.8.14 : irssi-0.8.14 analysis 2 : Null Test After Dereference  at perl-common.c:436

Categories: LANG.STRUCT.NTAD
Warning ID: 7354.28451
Similar Warnings: 7354.28450
Procedure: perl_nick_fill_hash
Trace: view
Modified: Thu Nov 26 11:09:58 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     
LineSource
  /kat0/fletcher/SATE/2010/irssi-0.8.14/src/perl/perl-common.c
  Enter perl_nick_fill_hash
411 void perl_nick_fill_hash(HV *hv, NICK_REC *nick) 
412 {
413         char *type, *chat_type;
414  
415         g_return_if_fail(hv != NULL);
416         g_return_if_fail(nick != NULL);
417  
418         type = "NICK";
419         chat_type = (char *) chat_protocol_find_id(nick->chat_type)->name;   /* Null Pointer Dereference (ID: 7355.28452) */
420  
421         hv_store(hv, "type", 4, new_pv(type), 0);
422         hv_store(hv, "chat_type", 9, new_pv(chat_type), 0);
423  
424         hv_store(hv, "nick", 4, new_pv(nick->nick), 0);
425         hv_store(hv, "host", 4, new_pv(nick->host), 0);
426         hv_store(hv, "realname", 8, new_pv(nick->realname), 0);
427         hv_store(hv, "hops", 4, newSViv(nick->hops), 0);
428  
429         hv_store(hv, "gone", 4, newSViv(nick->gone), 0);
430         hv_store(hv, "serverop", 8, newSViv(nick->serverop), 0);
431  
432         hv_store(hv, "op", 2, newSViv(nick->op), 0);
433         hv_store(hv, "halfop", 6, newSViv(nick->halfop), 0);
434         hv_store(hv, "voice", 5, newSViv(nick->voice), 0);
435         hv_store(hv, "other", 5, newSViv(nick->prefixes[0]), 0);
436         hv_store(hv, "prefixes", 8, new_pv(nick->prefixes), 0);     /* Null Test After Dereference */
437  
438         hv_store(hv, "last_check", 10, newSViv(nick->last_check), 0);
439         hv_store(hv, "send_massjoin", 13, newSViv(nick->send_massjoin), 0);
440 } 




Change Warning 7354.28451 : Null Test After Dereference

Because they are very similar, this warning shares annotations with warning 7354.28450.
CodeSonar has selected warning 7354.28450 to represent this group of similar warnings. In order to edit this group, you must edit warning 7354.28450.