Text  |   XML   |   Visible Warnings:

irssi-0.8.14 : irssi-0.8.14 analysis 2 : Null Pointer Dereference  at dcc-resume.c:149

Categories: LANG.MEM.NPD CWE:476
Warning ID: 7270.28355
Similar Warnings: 7270.28356
Procedure: ctcp_msg_dcc_resume
Trace: view
Modified: Thu Nov 26 11:09:02 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
   /kat0/fletcher/SATE/2010/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 (ID: 7270.28356) */
 145                                               "DCC ACCEPT \"%s\" %d %"PRIuUOFF_T : 
 146                                               "DCC ACCEPT %s %d %"PRIuUOFF_T,
 147                                               dcc->arg, dcc->port, dcc->transfd);
 148                 } else {
 149                         str = g_strdup_printf(DCC_SEND(dcc)->file_quoted ?     /* Null Pointer Dereference */
 150                                               "DCC ACCEPT \"%s\" 0 %"PRIuUOFF_T" %d" : 
 151                                               "DCC ACCEPT %s 0 %"PRIuUOFF_T" %d",
true152                                               dcc->arg, dcc->transfd, dcc->pasv_id);
Preconditions
&$unknown_342730 != 0
((char*)&$unknown_342731)[152] >= &$unknown_342732 + 1
dcc_conns >= 0
Postconditions
((char*)&$unknown_342731)[140]' >= 0
dcc' = &$unknown_342731
size' = &$unknown_342732




Change Warning 7270.28355 : Null Pointer Dereference

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

Priority:
State:
Finding:
Owner:
Note: