Text  |   XML   |   Visible Warnings:

Irssi : Irssi analysis 1 : Null Test After Dereference  at perl-common.c:436

Categories: LANG.STRUCT.NTAD
Warning ID: 2292.2300
Similar Warnings: 2292.2301
Procedure: perl_nick_fill_hash
Trace: View
Modified: Wed Sep 2 11:57:35 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
  /u1/paul/SATE/2010/c/irssi/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: 2293.2302) */
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 2292.2300 : Null Test After Dereference

Because they are very similar, this warning shares annotations with warning 2292.2301.

Priority:
State:
Finding:
Owner:
Note: