Text  |   XML   |   Visible Warnings:

Irssi : Irssi analysis 1 : Null Pointer Dereference  at dcc-resume.c:144

Categories: LANG.MEM.NPD CWE:476
Warning ID: 2205.2211
Similar Warnings: 2205.2210
Procedure: ctcp_msg_dcc_resume
Trace: View
Modified: Wed Sep 2 11:52:31 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/dcc/dcc-resume.c
   Enter ctcp_msg_dcc_resume
 130 static void ctcp_msg_dcc_resume(IRC_SERVER_REC *server, const char *data,
 131                                 const char *nick, const char *addr,
 132                                 const char *target, DCC_REC *chat) 
 133 {
 134         FILE_DCC_REC *dcc;
 135         char *str;
 136         uoff_t size;
 137         int pasv_id = -1;
 138  
 139         if (!dcc_ctcp_resume_parse(DCC_SEND_TYPE, data, nick, &dcc, &size, &pasv_id)) {
 140                 signal_emit("dcc error ctcp", 5, "RESUME", data,
 141                             nick, addr, target);
 142         } else if (dcc != NULL && dcc_resume_file_check(dcc, server, size)) {
 143                 if (!dcc_is_passive(dcc)) {
 144                         str = g_strdup_printf(DCC_SEND(dcc)->file_quoted ?     /* Null Pointer Dereference */
 145                                               "DCC ACCEPT \"%s\" %d %"PRIuUOFF_T : 
 146                                               "DCC ACCEPT %s %d %"PRIuUOFF_T,
true147                                               dcc->arg, dcc->port, dcc->transfd);
Preconditions
&$unknown_555076 != 0
((char*)&$unknown_555077)[184] <= -1
dcc_conns >= 0
Postconditions
addr' = $param_4
((char*)&$unknown_555077)[176]' <= ((char*)&$unknown_555077)[200] - 1
((char*)&$unknown_555077)[208]' = ((char*)&$unknown_555077)[176]'
chat' = $param_6
data' = $param_2
dcc' = &$unknown_555077
nick' = $param_3
server' = $param_1
size' = ((char*)&$unknown_555077)[176]'
target' = $param_5




Change Warning 2205.2211 : Null Pointer Dereference

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