Text  |   XML   |   Visible Warnings:

Irssi : Irssi analysis 1 : Dangerous Function Cast  at textbuffer-view.c:327

Categories: LANG.CAST.FN CWE:628 CWE:234
Warning ID: 2068.2068
Procedure: view_reset_cache
Trace: View
Modified: Wed Sep 2 11:48:40 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/fe-text/textbuffer-view.c
   Enter view_reset_cache
 317                 view->cache->last_linecount = view_get_linecount(view, line);   /* Null Pointer Dereference (ID: 2365.2376) */
 318 }
 319  
 320 static void view_reset_cache(TEXT_BUFFER_VIEW_REC *view) 
 321 {
 322         GSList *tmp;
 323  
 324         /* destroy line caches - note that you can't do simultaneously 
 325            unrefs + cache_get()s or it will keep using the old caches */ 
 326         textbuffer_cache_unref(view->cache);
Wrong Number of Parameters327         g_slist_foreach(view->siblings, (GFunc) textbuffer_cache_unref, NULL);     /* Dangerous Function Cast */
 328  
 329         view->cache = textbuffer_cache_get(view->siblings, view->width);
 330         for (tmp = view->siblings; tmp != NULL; tmp = tmp->next) {
 331                 TEXT_BUFFER_VIEW_REC *rec = tmp->data;
 332  
 333                 rec->cache = textbuffer_cache_get(rec->siblings, rec->width);
 334         }
 335 
 336  
 337 static int view_line_draw(TEXT_BUFFER_VIEW_REC *view, LINE_REC *line,




Change Warning 2068.2068 : Dangerous Function Cast

Priority:
State:
Finding:
Owner:
Note: