(/home/sate/Testcases/c/cve/wireshark-1.2.0/gtk/font_utils.c) |
| |
| 203 | | | static char * |
| 204 | | | font_zoom(char *gui_font_name) |
| 205 | | | { |
| 206 | | | char *new_font_name; |
| 207 | | | char *font_name_dup; |
| 208 | | | char *font_name_p; |
| 209 | | | long font_point_size_l; |
| 210 | | | |
| 211 | | | if (recent.gui_zoom_level == 0) { |
Event 1:
Skipping " if". recent.gui_zoom_level == 0 evaluates to false.
hide
|
|
| 212 | | | |
| 213 | | | |
| 214 | | | |
| 215 | | | return g_strdup(gui_font_name); |
| 216 | | | } |
| 217 | | | |
| 218 | | | font_name_dup = g_strdup(gui_font_name); |
| 219 | | | font_name_p = font_name_dup; |
| 220 | | | |
| 221 | | | |
| 222 | | | font_name_p = strrchr(font_name_dup, ' '); |
Event 3:
strrchr() returns NULL. - Dereferenced later, causing the null pointer dereference.
hide
Event 4:
font_name_p is set to strrchr(font_name_dup, 32), which evaluates to NULL. See related event 3.
hide
|
|
| 223 | | | *font_name_p = '\0'; |
Null Pointer Dereference
font_name_p is dereferenced here, but it is NULL. The issue can occur if the highlighted code executes. See related event 4. Show: All events | Only primary events |
|
| |