Possible null pointer dereference
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
Confirmed
|
Undecided
|
Jon A. Cruz |
Bug Description
These errors follow following routine:
a->foo();
if( a ){ ... }
So first pointer is used, and only after that it is checked whether it is null or not. Sometimes the check is redundant and sometimes the usage should just be guarded with the null check.
# Looks like the for-clause needs to be protected with "if(cur)". The check inside for-clause is not enough as first statement gets executed before if(cur) is checked.
[../inkscape/
# Same as above
[../inkscape/
# Not sure if g_string_new can return null, but the check is redundant at that point for sure. If it returns null, the app will crash long before it gets that far.
[../inkscape/
# Classic check after using it
[../inkscape/
[../inkscape/
# Confirmed (some duplicate code here perhaps?)
[../inkscape/
[../inkscape/
[../inkscape/
[../inkscape/
Related branches
Changed in inkscape: | |
assignee: | nobody → Jon A. Cruz (jon-joncruz) |
status: | New → Confirmed |
description: | updated |
description: | updated |