errors found by cppcheck

Bug #488862 reported by ericsesterhenn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
Fix Released
Low
Unassigned

Bug Description

these are patches for several issues found by cppcheck:

[inkscape/buildtool.cpp:5217]: (error) Resource leak: srcf
[inkscape/src/2geom/path-intersection.cpp:122]: (error) When i==p.size(), p[i] is out of bounds
[inkscape/src/2geom/path-intersection.cpp:123]: (error) When i==p.size(), p[i] is out of bounds
[inkscape/src/2geom/path-intersection.cpp:127]: (error) When i==p.size(), p[i] is out of bounds
[inkscape/src/2geom/path-intersection.cpp:129]: (error) When i==p.size(), p[i] is out of bounds
[inkscape/src/2geom/path-intersection.cpp:489]: (error) When i==p.size(), p[i] is out of bounds
[inkscape/src/2geom/path-intersection.cpp:490]: (error) When i==p.size(), p[i] is out of bounds
[inkscape/src/2geom/path-intersection.cpp:492]: (error) When i==p.size(), p[i] is out of bounds
[inkscape/src/bind/javabind.cpp:1060]: (error) Mismatching allocation and deallocation: jvals
[inkscape/src/bind/javabind.cpp:1013]: (error) Memory leak: jvals
[inkscape/src/bind/javabind.cpp:1181]: (error) Mismatching allocation and deallocation: jvals
[inkscape/src/bind/javabind.cpp:1134]: (error) Memory leak: jvals
[inkscape/src/dom/util/ziptool.cpp:2210]: (possible error) Memory leak: ze
[inkscape/src/extension/dxf2svg/entities2elements.cpp:92]: (error) Buffer access out-of-bounds
[inkscape/src/extension/dxf2svg/entities2elements.cpp:118]: (error) Buffer access out-of-bounds
[inkscape/src/extension/dxf2svg/entities2elements.cpp:197]: (error) Buffer access out-of-bounds
[inkscape/src/extension/dxf2svg/entities2elements.cpp:224]: (error) Buffer access out-of-bounds
[inkscape/src/extension/internal/emf-win32-inout.cpp:130]: (error) Memory leak: oldoutput
[inkscape/src/extension/internal/odf.cpp:798]: (error) Mismatching allocation and deallocation: e
[inkscape/src/extension/internal/odf.cpp:799]: (error) Mismatching allocation and deallocation: work
[inkscape/src/extension/internal/pdfinput/pdf-input.cpp:741]: (possible error) Memory leak: dlg
[inkscape/src/extension/internal/pdfinput/svg-builder.cpp:1539]: (error) Mismatching allocation and deallocatio
n: buffer
[inkscape/src/extension/internal/pdfinput/svg-builder.cpp:1578]: (error) Mismatching allocation and deallocatio
n: buffer
[inkscape/src/extension/param/description.h:23]: (possible error) Memory leak: ParamDescription::_value
[inkscape/src/inkjar/jar.cpp:84]: (error) Mismatching allocation and deallocation: JarFile::_filename
[inkscape/src/libcroco/cr-cascade.c:74]: (error) Memory leak: result

Related branches

Revision history for this message
ericsesterhenn (eric-sesterhenn) wrote :
Revision history for this message
ericsesterhenn (eric-sesterhenn) wrote :
Revision history for this message
ericsesterhenn (eric-sesterhenn) wrote :
Revision history for this message
ericsesterhenn (eric-sesterhenn) wrote :
Revision history for this message
ericsesterhenn (eric-sesterhenn) wrote :
Revision history for this message
ericsesterhenn (eric-sesterhenn) wrote :
Revision history for this message
ericsesterhenn (eric-sesterhenn) wrote :
Revision history for this message
ericsesterhenn (eric-sesterhenn) wrote :
Revision history for this message
ericsesterhenn (eric-sesterhenn) wrote :
Revision history for this message
ericsesterhenn (eric-sesterhenn) wrote :
Revision history for this message
ericsesterhenn (eric-sesterhenn) wrote :
Revision history for this message
ericsesterhenn (eric-sesterhenn) wrote :

I build tested the patches only on linux, so I probably didnt cover everything during compilation.

su_v (suv-lp)
tags: added: build-compile-code-design patch
Revision history for this message
ScislaC (scislac) wrote :

ericsesterhenn:

Wowza! Thanks! Once trunk is open for development again I will review and commit.

Revision history for this message
Johan Engelen (johanengelen) wrote :

Thanks for finding these issues with cppcheck and providing patches for them!!!!!!
I just applied the 2nd patch to inkscape and 2geom.

ScislaC (scislac)
Changed in inkscape:
status: New → In Progress
milestone: none → 0.48
Revision history for this message
Krzysztof Kosinski (tweenk) wrote :

OK, looks like all patches are applied.

Changed in inkscape:
status: In Progress → Fix Committed
Changed in inkscape:
importance: Undecided → Low
jazzynico (jazzynico)
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.