Text  |   XML   |   Visible Warnings:

Irssi : Irssi analysis 1 : Dangerous Function Cast  at log.c:474

Categories: LANG.CAST.FN CWE:628 CWE:234
Warning ID: 66.66
Procedure: sig_rotate_check
Trace: View
Modified: Wed Sep 2 11:31:48 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/core/log.c
   Enter sig_rotate_check
 464 {
 465         static int last_hour = -1;
 466         struct tm tm;
 467         time_t now;
 468  
 469         /* don't do anything until hour is changed */ 
 470         now = time(NULL);
 471         memcpy(&tm, localtime(&now), sizeof(tm));   /* Buffer Overrun (ID: 2117.2118) */
 472         if (tm.tm_hour != last_hour) {
 473                 last_hour = tm.tm_hour;
Wrong Number of Parameters474                 g_slist_foreach(logs, (GFunc) log_rotate_check, NULL);     /* Dangerous Function Cast */
 475         }
 476         return 1;
 477 
 478  
 479 static void log_items_read_config(CONFIG_NODE *node, LOG_REC *log)
 480 {
 481         LOG_ITEM_REC *rec;
 482         GSList *tmp;
 483         char *item;
 484         int type;




Change Warning 66.66 : Dangerous Function Cast

Priority:
State:
Finding:
Owner:
Note: