Re: [sleuthkit-developers] Dereferencing null pointer error in ntfs_dent.c
Brought to you by:
carrier
From: Brian C. <ca...@sl...> - 2010-04-21 01:53:37
|
Thanks Aaron. I checked these in. This NULL reference actually isn't an issue because the previous if() takes care of that case, but I rewrote it to make it more clear. Thanks! brian On Apr 19, 2010, at 6:00 AM, Aaron Burghardt wrote: > Hi, > > I ran Xcode's static analyzer on TSK and it flagged this error: > > .../sleuthkit/xcode/../tsk3/fs/ntfs_dent.c:123:31: warning: Dereference of null pointer > prev->next = map; > ^ > > The context is below, which is appears to be a legitimate error: > > else { > NTFS_PAR_MAP *prev = NULL; > // somewhere in the middle of the list > for (tmp = ntfs->orphan_map; tmp; tmp = tmp->next) { > if (tmp->par_addr > par) { > map->next = tmp; > prev->next = map; > break; > } > prev = tmp; > } > > // at the end of the list > if (map->next == NULL) > prev->next = map; > } > > > Regards, > > Aaron > > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > sleuthkit-developers mailing list > sle...@li... > https://lists.sourceforge.net/lists/listinfo/sleuthkit-developers |