Activity log for bug #812517

Date Who What changed Old value New value Message
2011-07-18 19:52:59 Reijo Tomperi bug added bug
2011-07-19 04:27:01 su_v inkscape: status New Confirmed
2011-07-19 04:27:01 su_v inkscape: assignee Jon A. Cruz (jon-joncruz)
2011-07-24 11:05:37 Kris 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. # Code makes no sence. There is a null check and only if peffect is null, it is used (which would mean certain crash). [../inkscape/inkscape/src/extension/patheffect.cpp:72]: (error) Possible null pointer dereference: peffect - otherwise it is redundant to check if peffect is null at line 67 # 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/inkscape/src/libcroco/cr-declaration.c:759]: (error) Possible null pointer dereference: cur - otherwise it is redundant to check if cur is null at line 753 # Same as above [../inkscape/inkscape/src/libcroco/cr-selector.c:259]: (error) Possible null pointer dereference: cur - otherwise it is redundant to check if cur is null at line 253 # 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/inkscape/src/libcroco/cr-statement.c:636]: (error) Possible null pointer dereference: stringue - otherwise it is redundant to check if stringue is null at line 638 # Perhaps this line should be inside the if-clause: int prOffset = pRun->item->offset; // start of the run in the line [../inkscape/inkscape/src/libnrtype/TextWrapper.cpp:209]: (error) Possible null pointer dereference: pRun - otherwise it is redundant to check if pRun is null at line 210 # Classic check after using it [../inkscape/inkscape/src/livarot/AVL.cpp:351]: (error) Possible null pointer dereference: a - otherwise it is redundant to check if a is null at line 353 [../inkscape/inkscape/src/livarot/AVL.cpp:352]: (error) Possible null pointer dereference: a - otherwise it is redundant to check if a is null at line 353 # Confirmed (some duplicate code here perhaps?) [../inkscape/inkscape/src/livarot/AVL.cpp:410]: (error) Possible null pointer dereference: e - otherwise it is redundant to check if e is null at line 436 [../inkscape/inkscape/src/livarot/AVL.cpp:510]: (error) Possible null pointer dereference: a - otherwise it is redundant to check if a is null at line 512 [../inkscape/inkscape/src/livarot/AVL.cpp:511]: (error) Possible null pointer dereference: a - otherwise it is redundant to check if a is null at line 512 [../inkscape/inkscape/src/livarot/AVL.cpp:569]: (error) Possible null pointer dereference: e - otherwise it is redundant to check if e is null at line 595 # Confirmed [../inkscape/inkscape/src/selection-describer.cpp:145]: (error) Possible null pointer dereference: layer - otherwise it is redundant to check if layer is null at line 141 # Bug that would occur only if "new" returns null (some compilers did that). For most users this is just redundant check. [../inkscape/inkscape/src/2geom/quadtree.cpp:234]: (error) Possible null pointer dereference: q - otherwise it is redundant to check if q is null at line 182 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/inkscape/src/libcroco/cr-declaration.c:759]: (error) Possible null pointer dereference: cur - otherwise it is redundant to check if cur is null at line 753 # Same as above [../inkscape/inkscape/src/libcroco/cr-selector.c:259]: (error) Possible null pointer dereference: cur - otherwise it is redundant to check if cur is null at line 253 # 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/inkscape/src/libcroco/cr-statement.c:636]: (error) Possible null pointer dereference: stringue - otherwise it is redundant to check if stringue is null at line 638 # Perhaps this line should be inside the if-clause: int prOffset = pRun->item->offset; // start of the run in the line [../inkscape/inkscape/src/libnrtype/TextWrapper.cpp:209]: (error) Possible null pointer dereference: pRun - otherwise it is redundant to check if pRun is null at line 210 # Classic check after using it [../inkscape/inkscape/src/livarot/AVL.cpp:351]: (error) Possible null pointer dereference: a - otherwise it is redundant to check if a is null at line 353 [../inkscape/inkscape/src/livarot/AVL.cpp:352]: (error) Possible null pointer dereference: a - otherwise it is redundant to check if a is null at line 353 # Confirmed (some duplicate code here perhaps?) [../inkscape/inkscape/src/livarot/AVL.cpp:410]: (error) Possible null pointer dereference: e - otherwise it is redundant to check if e is null at line 436 [../inkscape/inkscape/src/livarot/AVL.cpp:510]: (error) Possible null pointer dereference: a - otherwise it is redundant to check if a is null at line 512 [../inkscape/inkscape/src/livarot/AVL.cpp:511]: (error) Possible null pointer dereference: a - otherwise it is redundant to check if a is null at line 512 [../inkscape/inkscape/src/livarot/AVL.cpp:569]: (error) Possible null pointer dereference: e - otherwise it is redundant to check if e is null at line 595 # Confirmed [../inkscape/inkscape/src/selection-describer.cpp:145]: (error) Possible null pointer dereference: layer - otherwise it is redundant to check if layer is null at line 141 # Bug that would occur only if "new" returns null (some compilers did that). For most users this is just redundant check. [../inkscape/inkscape/src/2geom/quadtree.cpp:234]: (error) Possible null pointer dereference: q - otherwise it is redundant to check if q is null at line 182
2011-10-29 16:53:55 Kris 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/inkscape/src/libcroco/cr-declaration.c:759]: (error) Possible null pointer dereference: cur - otherwise it is redundant to check if cur is null at line 753 # Same as above [../inkscape/inkscape/src/libcroco/cr-selector.c:259]: (error) Possible null pointer dereference: cur - otherwise it is redundant to check if cur is null at line 253 # 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/inkscape/src/libcroco/cr-statement.c:636]: (error) Possible null pointer dereference: stringue - otherwise it is redundant to check if stringue is null at line 638 # Perhaps this line should be inside the if-clause: int prOffset = pRun->item->offset; // start of the run in the line [../inkscape/inkscape/src/libnrtype/TextWrapper.cpp:209]: (error) Possible null pointer dereference: pRun - otherwise it is redundant to check if pRun is null at line 210 # Classic check after using it [../inkscape/inkscape/src/livarot/AVL.cpp:351]: (error) Possible null pointer dereference: a - otherwise it is redundant to check if a is null at line 353 [../inkscape/inkscape/src/livarot/AVL.cpp:352]: (error) Possible null pointer dereference: a - otherwise it is redundant to check if a is null at line 353 # Confirmed (some duplicate code here perhaps?) [../inkscape/inkscape/src/livarot/AVL.cpp:410]: (error) Possible null pointer dereference: e - otherwise it is redundant to check if e is null at line 436 [../inkscape/inkscape/src/livarot/AVL.cpp:510]: (error) Possible null pointer dereference: a - otherwise it is redundant to check if a is null at line 512 [../inkscape/inkscape/src/livarot/AVL.cpp:511]: (error) Possible null pointer dereference: a - otherwise it is redundant to check if a is null at line 512 [../inkscape/inkscape/src/livarot/AVL.cpp:569]: (error) Possible null pointer dereference: e - otherwise it is redundant to check if e is null at line 595 # Confirmed [../inkscape/inkscape/src/selection-describer.cpp:145]: (error) Possible null pointer dereference: layer - otherwise it is redundant to check if layer is null at line 141 # Bug that would occur only if "new" returns null (some compilers did that). For most users this is just redundant check. [../inkscape/inkscape/src/2geom/quadtree.cpp:234]: (error) Possible null pointer dereference: q - otherwise it is redundant to check if q is null at line 182 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/inkscape/src/libcroco/cr-declaration.c:759]: (error) Possible null pointer dereference: cur - otherwise it is redundant to check if cur is null at line 753 # Same as above [../inkscape/inkscape/src/libcroco/cr-selector.c:259]: (error) Possible null pointer dereference: cur - otherwise it is redundant to check if cur is null at line 253 # 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/inkscape/src/libcroco/cr-statement.c:636]: (error) Possible null pointer dereference: stringue - otherwise it is redundant to check if stringue is null at line 638 # Classic check after using it [../inkscape/inkscape/src/livarot/AVL.cpp:351]: (error) Possible null pointer dereference: a - otherwise it is redundant to check if a is null at line 353 [../inkscape/inkscape/src/livarot/AVL.cpp:352]: (error) Possible null pointer dereference: a - otherwise it is redundant to check if a is null at line 353 # Confirmed (some duplicate code here perhaps?) [../inkscape/inkscape/src/livarot/AVL.cpp:410]: (error) Possible null pointer dereference: e - otherwise it is redundant to check if e is null at line 436 [../inkscape/inkscape/src/livarot/AVL.cpp:510]: (error) Possible null pointer dereference: a - otherwise it is redundant to check if a is null at line 512 [../inkscape/inkscape/src/livarot/AVL.cpp:511]: (error) Possible null pointer dereference: a - otherwise it is redundant to check if a is null at line 512 [../inkscape/inkscape/src/livarot/AVL.cpp:569]: (error) Possible null pointer dereference: e - otherwise it is redundant to check if e is null at line 595
2011-10-29 18:37:48 Kris branch linked lp:inkscape