cppcheck analysis of grass_6.4.0~rc6-1.dsc
- ./display/d.barscale/main.c:171 [error] - Undefined behaviour: cmdbuf is used wrong in call to sprintf or snprintf. Quote: If copying takes place between objects that overlap as a result of a call to sprintf() or snprintf(), the results are undefined.
- ./display/d.barscale/main.c:172 [error] - Undefined behaviour: cmdbuf is used wrong in call to sprintf or snprintf. Quote: If copying takes place between objects that overlap as a result of a call to sprintf() or snprintf(), the results are undefined.
- ./display/d.profile/Range.c:27 [error] - Buffer access out-of-bounds
- ./display/d.text.new/main.c:363 [error] - Undefined behaviour: buf is used wrong in call to sprintf or snprintf. Quote: If copying takes place between objects that overlap as a result of a call to sprintf() or snprintf(), the results are undefined.
- ./display/d.text.new/main.c:364 [error] - Undefined behaviour: buf is used wrong in call to sprintf or snprintf. Quote: If copying takes place between objects that overlap as a result of a call to sprintf() or snprintf(), the results are undefined.
- ./display/d.text.new/main.c:365 [error] - Undefined behaviour: buf is used wrong in call to sprintf or snprintf. Quote: If copying takes place between objects that overlap as a result of a call to sprintf() or snprintf(), the results are undefined.
- ./display/d.text.new/main.c:366 [error] - Undefined behaviour: buf is used wrong in call to sprintf or snprintf. Quote: If copying takes place between objects that overlap as a result of a call to sprintf() or snprintf(), the results are undefined.
- ./display/d.text.new/main.c:367 [error] - Undefined behaviour: buf is used wrong in call to sprintf or snprintf. Quote: If copying takes place between objects that overlap as a result of a call to sprintf() or snprintf(), the results are undefined.
- ./display/d.text.new/main.c:368 [error] - Undefined behaviour: buf is used wrong in call to sprintf or snprintf. Quote: If copying takes place between objects that overlap as a result of a call to sprintf() or snprintf(), the results are undefined.
- ./display/d.vect/label.c:97 [error] - Undefined behaviour: text is used wrong in call to sprintf or snprintf. Quote: If copying takes place between objects that overlap as a result of a call to sprintf() or snprintf(), the results are undefined.
- ./display/d.vect/label.c:99 [error] - Undefined behaviour: text is used wrong in call to sprintf or snprintf. Quote: If copying takes place between objects that overlap as a result of a call to sprintf() or snprintf(), the results are undefined.
- ./display/d.zoom/print.c:106 [error] - Undefined behaviour: buffer is used wrong in call to sprintf or snprintf. Quote: If copying takes place between objects that overlap as a result of a call to sprintf() or snprintf(), the results are undefined.
- ./display/d.zoom/print.c:113 [error] - Undefined behaviour: buffer is used wrong in call to sprintf or snprintf. Quote: If copying takes place between objects that overlap as a result of a call to sprintf() or snprintf(), the results are undefined.
- ./display/d.zoom/print.c:120 [error] - Undefined behaviour: buffer is used wrong in call to sprintf or snprintf. Quote: If copying takes place between objects that overlap as a result of a call to sprintf() or snprintf(), the results are undefined.
- ./gem/actions.c:258 [error] - Resource leak: fp
- ./gem/actions.c:1047 [error] - Deallocating a deallocated pointer: f_in
- ./gem/at_exit_funcs.c:103 [error] - Resource leak: dir
- ./gem/main.c:299 [possible error] - Resource leak: fp
- ./gem/reg_deps.c:332 [possible error] - Resource leak: f_out
- ./gem/reg_entries.c:316 [error] - Resource leak: f_out
- ./gem/reg_entries.c:525 [error] - Resource leak: f_out
- ./gem/reg_entries.c:756 [error] - Resource leak: f_out
- ./gem/reg_html.c:228 [error] - Resource leak: f_out
- ./gem/reg_html.c:330 [error] - Resource leak: f_out
- ./gem/reg_html.c:440 [error] - Resource leak: f_out
- ./gem/tools.c:683 [error] - Resource leak: dir
- ./gem/tools.c:719 [error] - Resource leak: dir
- ./gem/tools.c:823 [possible error] - Resource leak: f
- ./gui/wxpython/vdigit/driver_draw.cpp:85 [possible error] - Memory leak: fillArea
- ./gui/wxpython/vdigit/driver_draw.cpp:85 [possible error] - Memory leak: fillAreaSelected
- ./gui/wxpython/vdigit/driver_draw.cpp:490 [possible error] - Memory leak: pen
- ./gui/wxpython/vdigit/pseudodc.cpp:176 [possible error] - Mismatching allocation and deallocation: gpdcDrawLinesOp::m_points
- ./gui/wxpython/vdigit/pseudodc.cpp:201 [possible error] - Mismatching allocation and deallocation: gpdcDrawPolygonOp::m_points
- ./gui/wxpython/vdigit/pseudodc.cpp:150 [possible error] - Mismatching allocation and deallocation: gpdcDrawPolyPolygonOp::m_count
- ./gui/wxpython/vdigit/pseudodc.cpp:149 [possible error] - Mismatching allocation and deallocation: gpdcDrawPolyPolygonOp::m_points
- ./gui/wxpython/vdigit/pseudodc.cpp:226 [possible error] - Mismatching allocation and deallocation: gpdcDrawSplineOp::m_points
- ./imagery/i.ortho.photo/photo.2image/ask.c:265 [possible error] - Resource leak: fd
- ./imagery/i.ortho.photo/photo.2target/ask.c:263 [possible error] - Resource leak: fd
- ./imagery/i.points/ask.c:264 [possible error] - Resource leak: fd
- ./imagery/i.vpoints/ask.c:260 [possible error] - Resource leak: fd
- ./lib/bitmap/bitmap.c:74 [error] - Memory leak: map
- ./lib/bitmap/bitmap.c:327 [error] - Memory leak: map
- ./lib/bitmap/bitmap.c:351 [error] - Memory leak: map.data
- ./lib/bitmap/sparse.c:55 [error] - Memory leak: map
- ./lib/cairodriver/read_ppm.c:26 [error] - Resource leak: input
- ./lib/cdhc/dagstndn.c:44 [error] - Memory leak: xcopy
- ./lib/cdhc/enormp.c:51 [error] - Uninitialized variable: x4
- ./lib/external/shapelib/shpopen.c:849 [error] - Memory leak: pszBasename
- ./lib/g3d/writeascii.c:54 [possible error] - Resource leak: fp
- ./lib/gis/copy_file.c:48 [error] - Resource leak: infp
- ./lib/gis/debug.c:95 [possible error] - Resource leak: fd
- ./lib/gis/ls.c:115 [error] - Resource leak: dfd
- ./lib/ogsf/GK2.c:446 [error] - Data is allocated but not initialized: newk
- ./lib/ogsf/Gs3.c:887 [error] - Uninitialized variable: fd
- ./lib/rst/data/dataquad.c:58 [error] - Memory leak: data
- ./lib/symbol/read.c:345 [error] - Undefined behaviour: buf is used wrong in call to sprintf or snprintf. Quote: If copying takes place between objects that overlap as a result of a call to sprintf() or snprintf(), the results are undefined.
- ./lib/symbol/read.c:429 [error] - Undefined behaviour: buf is used wrong in call to sprintf or snprintf. Quote: If copying takes place between objects that overlap as a result of a call to sprintf() or snprintf(), the results are undefined.
- ./lib/vector/Vlib/dbcolumns.c:79 [error] - Undefined behaviour: buf is used wrong in call to sprintf or snprintf. Quote: If copying takes place between objects that overlap as a result of a call to sprintf() or snprintf(), the results are undefined.
- ./lib/vector/Vlib/dbcolumns.c:139 [error] - Undefined behaviour: buf is used wrong in call to sprintf or snprintf. Quote: If copying takes place between objects that overlap as a result of a call to sprintf() or snprintf(), the results are undefined.
- ./lib/vector/Vlib/dbcolumns.c:202 [error] - Undefined behaviour: buf is used wrong in call to sprintf or snprintf. Quote: If copying takes place between objects that overlap as a result of a call to sprintf() or snprintf(), the results are undefined.
- ./lib/vector/dglib/examples/opt.c:220 [error] - Memory leak: pszArgv
- ./raster/r.coin/make_coin.c:73 [error] - Deallocating a deallocated pointer: fd
- ./raster/r.in.gridatb/file_io.c:64 [error] - Deallocating a deallocated pointer: fp
- ./raster/r.kappa/calc_kappa.c:110 [possible error] - Resource leak: fd
- ./raster/r.kappa/prt_hdr.c:46 [possible error] - Resource leak: fd
- ./raster/r.kappa/prt_label.c:36 [possible error] - Resource leak: fd
- ./raster/r.kappa/prt_mat.c:179 [possible error] - Resource leak: fd
- ./raster/r.le/r.le.setup/sample.c:1164 [error] - Uninitialized variable: max
- ./raster/r.li/r.li.cwed/cwed.c:127 [error] - Resource leak: file_fd
- ./raster/r.li/r.li.cwed/cwed.c:333 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.cwed/cwed.c:474 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.cwed/cwed.c:610 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.daemon/daemon.c:282 [error] - Resource leak: res
- ./raster/r.li/r.li.daemon/daemon.c:282 [possible error] - Resource leak: random_access
- ./raster/r.li/r.li.daemon/daemon.c:707 [possible error] - Memory leak: file_buf
- ./raster/r.li/r.li.daemon/worker.c:259 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.daemon/worker.c:262 [error] - Memory leak: buf
- ./raster/r.li/r.li.dominance/dominance.c:159 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.dominance/dominance.c:370 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.dominance/dominance.c:574 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.edgedensity/edgedensity.c:164 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.edgedensity/edgedensity.c:425 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.edgedensity/edgedensity.c:690 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.mpa/mpa.c:137 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.mpa/mpa.c:200 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.mpa/mpa.c:265 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.mps/mps.c:159 [possible error] - Resource leak: mask_fd
- ./raster/r.li/r.li.mps/mps.c:529 [possible error] - Resource leak: mask_fd
- ./raster/r.li/r.li.mps/mps.c:899 [possible error] - Resource leak: mask_fd
- ./raster/r.li/r.li.padcv/padcv.c:138 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.padcv/padcv.c:533 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.padcv/padcv.c:926 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.padrange/padrange.c:146 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.padrange/padrange.c:545 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.padrange/padrange.c:928 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.padsd/padsd.c:137 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.padsd/padsd.c:533 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.padsd/padsd.c:924 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.patchdensity/main.c:201 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.patchdensity/main.c:202 [error] - Memory leak: mask_buf
- ./raster/r.li/r.li.patchdensity/main.c:201 [possible error] - Memory leak: mask_sup
- ./raster/r.li/r.li.patchnum/main.c:179 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.patchnum/main.c:180 [error] - Memory leak: mask_buf
- ./raster/r.li/r.li.patchnum/main.c:179 [possible error] - Memory leak: mask_sup
- ./raster/r.li/r.li.richness/richness.c:145 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.richness/richness.c:303 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.richness/richness.c:465 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.shannon/shannon.c:155 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.shannon/shannon.c:362 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.shannon/shannon.c:565 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.shape/main.c:85 [possible error] - Resource leak: mask_fd
- ./raster/r.li/r.li.shape/main.c:85 [possible error] - Memory leak: mask_buf
- ./raster/r.li/r.li.simpson/simpson.c:154 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.simpson/simpson.c:343 [error] - Resource leak: mask_fd
- ./raster/r.li/r.li.simpson/simpson.c:532 [error] - Resource leak: mask_fd
- ./raster/r.mfilter.fp/getfilt.c:162 [error] - Resource leak: fd
- ./raster/r.mfilter/getfilt.c:160 [error] - Resource leak: fd
- ./raster/r.out.gridatb/file_io.c:105 [error] - Resource leak: fp
- ./raster/r.quant/read_rules.c:85 [error] - Buffer access out-of-bounds
- ./raster/r.statistics/o_distrib.c:70 [error] - Resource leak: fd1
- ./raster/r.terraflow/nodata.h:65 [error] - Buffer access out-of-bounds
- ./raster/r.terraflow/plateau.h:50 [error] - Buffer access out-of-bounds
- ./raster/r.terraflow/unionFind.h:40 [possible error] - Memory leak: unionFind<int>::parent
- ./raster/r.terraflow/unionFind.h:41 [possible error] - Memory leak: unionFind<int>::rank
- ./raster/r.terraflow/sweep.cc:158 [error] - Uninitialized variable: flowpq
- ./raster3d/r3.in.v5d/v5d.c:2001 [error] - Resource leak: fd
- ./raster3d/r3.in.v5d/v5d.c:2381 [error] - Resource leak: fd
- ./raster3d/r3.out.v5d/v5d.c:2001 [error] - Resource leak: fd
- ./raster3d/r3.out.v5d/v5d.c:2381 [error] - Resource leak: fd
- ./raster3d/r3.showdspf/new_init_graphics.c:234 [error] - Resource leak: fp
- ./vector/v.clean/test/topocheck.c:54 [error] - Invalid number of character (() when these macros are defined: ''.
- ./vector/v.digit/i_face.c:91 [error] - Undefined behaviour: val is used wrong in call to sprintf or snprintf. Quote: If copying takes place between objects that overlap as a result of a call to sprintf() or snprintf(), the results are undefined.
- ./vector/v.digit/i_face.c:93 [error] - Undefined behaviour: val is used wrong in call to sprintf or snprintf. Quote: If copying takes place between objects that overlap as a result of a call to sprintf() or snprintf(), the results are undefined.
- ./vector/v.edit/main.c:437 [possible error] - Resource leak: ascii
- ./vector/v.external/main.c:53 [error] - Undefined behaviour: buf is used wrong in call to sprintf or snprintf. Quote: If copying takes place between objects that overlap as a result of a call to sprintf() or snprintf(), the results are undefined.
- ./vector/v.external/main.c:55 [error] - Undefined behaviour: buf is used wrong in call to sprintf or snprintf. Quote: If copying takes place between objects that overlap as a result of a call to sprintf() or snprintf(), the results are undefined.
- ./vector/v.in.dwg/entity.c:516 [error] - Array 'tempdouble[2]' index 2 out of bounds
- ./vector/v.in.dwg/entity.c:517 [error] - Array 'tempwidth[2]' index 2 out of bounds
- ./vector/v.in.dwg/main.c:219 [error] - Invalid number of character (() when these macros are defined: ''.
Note: if you think the results reveal a security bug,
please don't hesitate to contact the
security team
This report was generated on Thu, 16 Dec 2010 05:48:48 +0000, based on results by cppcheck 1.41-modif