(/home/sate/Testcases/c/cve/wireshark-1.2.0/gtk/fileset_dlg.c) |
| |
| 152 | | | fileset_dlg_add_file(fileset_entry *entry) { |
| 153 | | | char *created; |
| 154 | | | char *modified; |
| 155 | | | char *size; |
| 156 | | | struct tm *local; |
| 157 | | | GtkWidget *fs_lb; |
| 158 | | | GtkWidget *fs_rb; |
| 159 | | | gchar *title; |
| 160 | | | |
| 161 | | | |
| 162 | | | if (fs_w == NULL) { |
Event 1:
Skipping " if". fs_w == (void *)0 evaluates to false.
hide
|
|
| 163 | | | return; |
| 164 | | | } |
| 165 | | | |
| 166 | [+] | | created = fileset_dlg_name2date_dup(entry->name); |
 |
| 167 | | | if(!created) { |
Event 3:
Taking true branch. created evaluates to false.
hide
|
|
| 168 | | | |
| 169 | | | |
| 170 | | | local = localtime(&entry->ctime); |
Event 4:
localtime() returns NULL. - Dereferenced later, causing the null pointer dereference.
hide
Event 5:
local is set to localtime(&entry->ctime), which evaluates to NULL. See related event 4.
hide
|
|
| 171 | | | created = g_strdup_printf("%04u.%02u.%02u %02u:%02u:%02u", |
| 172 | | | local->tm_year+1900, local->tm_mon+1, local->tm_mday, |
| 173 | | | local->tm_hour, local->tm_min, local->tm_sec); |
Null Pointer Dereference
local is dereferenced here, but it is NULL. The issue can occur if the highlighted code executes. See related event 5. Show: All events | Only primary events |
|
| |