Menu

Found_bugs

Daniel Marjamäki

Found bugs

These are some of the bugs that we've found with cppcheck.

7-Zip

CPP/7zip/Common/MemBlocks.h:24: Class CMemBlockManager does not have a virtual destructor
CPP/Common/MyCom.h:151: Class CMyUnknownImp does not have a virtual destructor
CPP/7zip/UI/Explorer/DllExports.cpp:80: Memory leak: shellExt
CPP/7zip/UI/Explorer/DllExports.cpp:146: Memory leak: cf

Alsa-Driver

acore/seq/old/instr/ainstr_iw.c:106: Memory leak: rp
utils/mod-deps.c:1584: Memory leak: tmp
alsa-kernel/isa/gus/gus_mem_proc.c:133: Memory leak: priv

Apache server

httpd-2.2.10/srclib/apr/build/jlibtool.c:924: Memory leak: path

Artistic Style (astyle)

src/astyle.h:168: Member variable not initialized in the constructor 'ASBase::fileType'
src/astyle.h:282:'operator=' should return something

BOINC

Leaks in lib/shmem.cpp (reported privately), fixed in [http://boinc.berkeley.edu/trac/changeset/19227 19227], [http://boinc.berkeley.edu/trac/changeset/19229 19229]

Memory leak in coproc code

bzip2

bzip2.c:1309: Resource leak: inStr
bzip2.c:1596: Resource leak: inStr

Cairo

perf/cairo-perf-graph-files.c:322: Mismatching allocation and deallocation: id
perf/cairo-perf-report.c:455: Memory leak: baseName
src/cairo-os2-surface.c:791: Memory leak: local_os2_surface
src/cairo-quartz-font.c:146: Memory leak: full_name
test/pdf2png.c:63: Mismatching allocation and deallocation: absolute
cairo/util/malloc-stats.c:90: Memory leak: name

CLucene

src/CLucene/queryParser/QueryParserBase.h:45: Class QueryParserBase does not have a virtual destructor
src/CLucene/search/SearchHeader.h:59: Class TopDocs does not have a virtual destructor
src/CLucene/util/bufferedstream.h:36: Class BufferedInputStream does not have a virtual destructor

cmake

Multiple files: Fix memory leaks on error
Source/cmFileCommand.cxx: Fix file descriptor leak on error
Source/CursesDialog/cmCursesLongMessageForm.cxx: Fix off-by-one memory access error

Code::Blocks

Memory leak in src/plugins/compilergcc/depslib/src/regexp.c
Mismatching allocation and deallocation in source_exporter
profiler/cbprofilerexec.cpp:255: Array index out of bounds
PlatMacOSX.cxx:324: Mismatching allocation and deallocation

CUPS

cups-1.3.10/cups/http.c:2769: Memory leak: conn
cups-1.3.10/backend/usb-darwin.c:1039: Dangerous usage of strncat

curl

src/main.c:5290: Overlapping data buffer dirbuildup

cyrus-imapd

imap/squat_build.c: Fix file descriptor leak on error
sieve/bc_eval.c: Missing break statement in switch call

Dia

app/sheets_dialog_callbacks.c:1504: Memory leak: so
dia/objects/SISSI/sissi_object.c:315: Mismatching allocation and deallocation: filename
lib/persistence.c:167: Memory leak: integer, realval, booleanval
objects/SISSI/sissi_object.c:369: Memory leak: file_name
objects/Jackson/domain.c:395: Memory leak: s

Doxygen

src/docparser.h:168: Class CompAccept which is inherited does not have a virtual destructor

Enchant

src/myspell/baseaffix.hxx:4: Class AffEntry which is inherited does not have a virtual destructor
src/myspell/: Member variables not initialized in constructor

Expect

expect-5.44.1/pty_unicos.c:92: No pair for character (")
expect-5.44.1/pty_unicos.c:94: No pair for character (")

Eye of GNOME

src/eog-image-jpeg.c:403: Memory leak: buf
src/eog-image-jpeg.c:381: Resource leak: outfile

fetchmail

socket.c: Fix small memory leak on error
interface: Remove unused variable
uid_db.c: Protect against possible NULL pointer

file

src/apptype.c: Fix resource leak on error

FileZilla

Mismatching allocation and deallocation: CHttpControlSocket::m_pRecvBuffer
Mismatching allocation and deallocation: CNetConfWizard::m_pSendBuffer
Uninitialized member variable 'CNewDir::doVisit'

Flex

regex.c:62: Overlapping data buffer errbuf

git

git-1.6.3.3/builtin-fast-export.c:447: Resource leak: f
git.1.6.3.3/xdiff-interface.c:215: resource leak f

Gnome MPlayer

gnome-mplayer-0.9.6/src/support.c:340: Memory leak: file
src/nautilus_property_page.c:140: Memory leak: ret
gnome-mplayer-0.9.6/src/support.c:514: Resource leak: fp
gnome-mplayer-0.9.6/src/support.c:1573: Mismatching allocation and deallocation: local_uri
gnome-mplayer-read-only/src/support.c:1232: Memory leak: ret

gnuplot

src/gadgets.c:420: Wrong assignement of an auto-variable to an effective parameter of a function
src/mouse.c:2061: Overlapping data buffer out
src/gplt_x11.c:1165: Memory leak: p

gnuplot-cpp

Member variables not initialized in the constructor

GTK

gtk/gdk-pixbuf/io-jasper.c:190: Memory leak: data
glib/gio/fam/fam-helper.c:223: Memory leak: sub
gtk+/gtk/gtkrecentchooserdefault.c: mismatching allocation and deallocation

GDM

gui/simple-greeter/gdm-sessions.c:181: Memory leak: id

Haiku

Mismatching allocation and deallocation: Cube::fGeometry
Resource leak: fd

KDE

KHTML/CSS: Array index out of bounds
kinfocenter: mismatching allocation and deallocation

KDiff3

src-QT4/fileaccess.cpp:1053: Mismatching allocation and deallocation: buf

libnl-nft

lib/route/route_obj.c: Fix comparison using same pointer

libquantum

libquantum-1.1.0/objcode.c:439: Resource leak: fhd

LiDIA

src/base/simple_classes/factorization/mpqs.cc:228: Overlapping data buffer string
src/base/simple_classes/factorization/mpqs.cc:239: Overlapping data buffer string
src/linear_algebra/m_multiple_gcd.cc:404: Memory leak: z

Linux kernel

linux-2.6.24.4/drivers/ata/sata_fsl.c:1279: Memory leak: r
linux-2.6.24.4/drivers/video/uvesafb.c:184: Memory leak: m
linux-2.6/drivers/net/wireless/wavelan.c:913: Array index out of bounds
linux-2.6/drivers/net/fs_enet/mii-fec.c: Memory leaks for new_bus and fec
linux-2.6/drivers/media/video/vivi.c:337: Memory leak: tmpbuf
linux-2.6/drivers/usb/gadget/pxa27x_udc.c:655: Memory leak: req
linux-2.6/kernel/audit.c:575: Memory leak: reply
linux-2.6/fs/hpfs/dir.c:149: Array index out of bounds
linux-2.6/drivers/char/ipmi/ipmi_si_intf.c:2704: Memory leak: info
linux-2.6/arch/cris/arch-v32/drivers/cryptocop.c:1398: Memory leak: p
linux-2.6/arch/powerpc/sysdev/qe_lib/ucc_fast.c:211: Memory leak: uccf
linux-2.6/arch/powerpc/sysdev/qe_lib/ucc_slow.c:174: Memory leak: uccs
linux-2.6/drivers/net/gianfar_mii.c:182: Memory leak: new_bus
linux-2.6/drivers/s390/net/claw.c:286: Memory leak: privptr
linux-2.6/drivers/char/tpm/tpm.c:1208: Memory leak: devname
linux-2.6/arch/mips/txx9/generic/setup.c:735: Memory leak: iocled
linux-2.6/drivers/staging/at76_usb/at76_usb.c:2323: Memory leak: iwe
linux-2.6/net/mac80211/debugfs_sta.c:202: Buffer overrun
linux-2.6/arch/x86/kvm/i8254.c:552: Memory leak: pit
linux-2.6/drivers/pcmcia/cistpl.c:357: Unreachable code
linux-2.6/drivers/net/cxgb3/sge.c:563: Possible memory leak: s
unused function drm_mm_add_space_to_tail
linux-2.6/drivers/net/usb/kaweth.c:290: Possible memory leak: dr
linux-2.6/drivers/uwb/neh.c:413: Memory leak: uwb_evt
linux-2.6/drivers/serial/ucc_uart.c:1279: Memory leak: qe_port
linux-2.6/arch/arm/mach-iop13xx/pci.c:1077: Memory leak: res
linux-2.6/arch/arm/mach-omap2/mmc-twl4030.c:400: Memory leak: mmc
linux-2.6/drivers/net/netxen/netxen_nic_init.c:951: Memory leak: buf
linux-2.6.29/drivers/isdn/mISDN/dsp_pipeline.c:64: Overlapping data buffer buf
linux-2.6.29.3/drivers/scsi/gdth_proc.c: overlapping data buffer
linux-2.6.29.3/drivers/scsi/qla2xxx/qla_attr.c: overlapping data buffer
linux-2.6.29.3/drivers/staging/rt2860/common/cmm_info: overlapping data buffer
linux-2.6.29.3/drivers/staging/rt2860/sta/assoc.c: overlapping data buffer
linux-2.6.29.3/drivers/staging/rt2860/sta/wpa.c: overlapping data buffer
linux-2.6.29.3/drivers/staging/rt2860/sta_ioctl.c: overlapping data buffers
linux-2.6.29.3/drivers/staging/rt2870/sta/wpa.c: overlapping data buffer
linux-2.6.29.4/arch/cris/arch-v32/kernel/irq.c: wrong #ifdef #endif sequence
arch/mips/mipssim/sim_time.c: Invalid number of character ({)
arch/mips/sibyte/common/cfe_console.c: Invalid number of character ({)
drivers/staging/wlan-ng/p80211netdev.c, wrong #ifdef #endif sequence
drivers/net/cassini.c: Use of uninitialized variable
drivers/gpu/drm/i915/intel_display.c: Wrong initializer for variable

LXDE

devtools/xml-purge/xml-purge.c:32: (error) Resource leak: fd
gpicview/src/xml-purge.c:32: (error) Resource leak: fd
lxinput/src/xml-purge.c:32: (error) Resource leak: fd
lxnm-applet/src/backend.c:424: (error) Memory leak: lxnm
lxnm/src/handler.c:73: (error) Memory leak: handler
lxnm/utils/getpppstat.c:181: (error) Memory leak: gpppsdata
lxpanel/src/xml-purge.c:32: (error) Resource leak: fd
lxsession-edit/src/xml-purge.c:32: (error) Resource leak: fd
lxtask/src/xfce-taskmanager-linux.c:246: (error) Memory leak: buffer
lxpanel/src/plugins/cpufreq/cpufreq.c:206: (error) Overlapping data buffer cpu_path

mdadm

config.c: Fix memory leak

mlmmj

Various file descriptor leaks

MPC-HC

Various fixes regarding unused variables
Several constructor warnings
Several uninitialized variables
Several fixes (inc. memory leak)
Several fixes
reduce variables scopes, catch exception by reference
Unitialized variable, possibly array out of index, reduce variable scope
Fix a typo in a comparison
initialize var in the constructor, reduce variable scope, unused variable value

MPlayer

Several memory leaks in gui/win32/skinload.c
libass/ass_fontconfig.c:422: Memory leak: priv
libavcodec/dv.c:976: Array index out of bounds
libmpcodecs/ae_toolame.c:169: Memory leak: ctx
libmpcodecs/ae_twolame.c:159: Memory leak: ctx
loader/dshow/outputpin.c:909: Memory leak: ivt
m_option.c:1483: Memory leak: cpy
stream/http.c:553: Memory leak: new_field
libmpdemux/demux_rawdv.c:150: Memory leak: frames
libmpdemux/demux_lavf.c:230: Memory leak: wf
libmpdemux/demux_gif.c:246: Memory leak: priv
libao2/ao_alsa.c:141: Memory leak: mix_name
libmpcodecs/ad_mpc.c:119: Memory leak: cd
libmpcodecs/ad_speex.c:44: Memory leak: ctx
libvo/vo_dxr2.c:318: Memory leak: img
stream/stream_cue.c:574: Memory leak: filename
stream/stream_radio.c:1145: Memory leak: priv
libmpdemux/demux_ty_osd.c Overlapping data buffer line, multiple errors
m_option.c:70: Memory leak: p

NUT (Network UPS Tools)

common/common.c: File descriptor leak
drivers/mge-utalk.c: Use of uninitialized memory
drivers/usb-common.c: Pointer check on wrong variable

OSSEC

src/os_execd/exec.c: Resource leak
src/agentlessd/agentlessd.c:164: Resource leak: fp

PCRE

pcre_exec.c: struct or union members are never used

PeerBlock

Removed some performance and style errors

PHP 6

sapi/isapi/stresstest/stresstest.cpp:274: Mismatching allocation and deallocation: threads
ext/date/lib/parse_tz.c:99: Memory leak: buffer

Pidgin

libpurple/plugins/mono/loader/mono.c:61: Memory leak: info
libpurple/plugins/mono/loader/mono.c:61: Memory leak: mplug
libpurple/protocols/oscar/oscar.c:6097: Memory leak: data
libpurple/protocols/sametime/sametime.c:4511: Memory leak: data
libpurple/protocols/simple/sipmsg.c:66: Memory leak: msg
pidgin/gtkutils.c:2449: Memory leak: dialog
finch/finch.c:399: Memory leak: opt_session_arg
libpurple/protocols/oscar/odc.c:570: Memory leak: frame
libpurple/protocols/gg/buddylist.c:224: Memory leak: buddylist
libpurple/protocols/qq/group_internal.c:71: Memory leak: value
libpurple/protocols/qq/group_opt.c:436: Memory leak: add_req
libpurple/protocols/sametime/sametime.c:3745: Memory leak: pass
libpurple/server.c:816: Memory leak: cid

PostgreSQL

src/interfaces/ecpg/compatlib/informix.c:763: Memory leak: temp #4493
src/test/regress/pg_regress.c:1112: Memory leak: s #4494
src/backend/storage/ipc/procarray.c:404: Memory leak: xids #4495
src/bin/pg_dump/pg_dump.c:3741: Memory leak: constrinfo #4496

Prime95

source259/linux/prime.c:990: Mismatching allocation and deallocation: fd
/home/oem/Desktop/source259/qd/dd.h:54: Member variable not initialized in the constructor 'dd_real::lo'
/home/oem/Desktop/source259/qd/dd.h:54: Member variable not initialized in the constructor 'dd_real::hi'

QGit Viewer

src/domain.h:106: Class Domain which is inherited does not have a virtual destructor

ReactOS

base/applications/downloader/xml.c: Missing fclose()
base/services/dhcp/memory.c: Perform free() on pointer if not NULL
boot/freeldr/tools/deptool.c: Perform free()'s
tools/buildno/buildno.cpp: fclose() and free() needed
tools/cdmake/cdmake.c: fclose() pointer on condition
tools/mkconfig.c: free() buffers
tools/rbuild/rbuild.h: Derived class Include requires virtual destructor from class ToolsetDirective
tools/rbuild/rbuild.h: Derived class Include requires virtual destructor from class CompilerDirective
tools/rsym/log2lines.c: missing fclose()
tools/stubgen.c: Release resources before returning
tools/stubgen.c: Use pclose() instead of fclose() when popen()

Rockbox

apps/plugins/resistor.c: Fix off-by-one memory corruption
apps/codecs/libgme/inflate/inflate.c: Clean up redundant assignment
apps/plugins/lib/xlcd_scroll.c: Fix use of uninitialized memory
apps/playlist.c: Fix file descriptor leak on error
apps/tagcache.c: Fix file descriptor leak on error
rbutil/ipodpatcher/fat32format.c: Fix off-by-one memory corruption in ipodpatcher
utils/MTP/beastpatcher/mknkboot.c: Don't close file descriptor twice
utils/rk27utils/rk27load/stage3_upload.c: Fix free() on wrong variable
apps/plugins/lib/xlcd_scroll.c: Fix uninitialized variables
apps/codecs/libfaad/structs.h: Fix buffer overflow in non-triggered code
apps/playback.c: Fix possible NULL reference
apps/plugins/chessbox/gnuchess.c: Fix marginal buffer overflow in chessbox
trunk/apps/codecs/libwmavoice/wmavoice.c: Wrong sizeof() argument to memset
apps/plugins/doom/m_cheat.c: Fix buffer overflow in unused code

Samba

testsuite/nsswitch/get{gr,pw}ent_r.c: wrong condition used to check fopen()
source4/client/client.c:3305: Memory leak: base_directory
source4/client/client.c:3305: Memory leak: desthost
lib/tdb/tools/tdbtorture.c:326: Memory leak: pids

Scintilla

2354098 scintilla/macosx/PlatMacOSX.cxx:324. delete without
2671749 macosx/PlatMacOSX.cxx:1631:Mismatching alloc and dealloc

Songbird

components/moz/streams/src/sbFileObjectStreams.h:37: Class sbFileObjectStream which is inherited does not have a virtual destructor
components/filesystemevents/base/src/sbFileSystemTreeListener.h:49: Class sbFileSystemTreeListener which is inherited does not have a virtual destructor
components/remoteapi/src/sbXPCScriptableStub.h:37: Class sbXPCScriptableStub which is inherited does not have a virtual destructor
components/mediacore/gstreamer/src/sbGStreamerMediacoreUtils.h:49: Class sbGStreamerMessageHandler which is inherited does not have a virtual destructor
components/mediacore/gstreamer/src/sbIGstAudioFilter.h:34: Class sbIGstAudioFilter which is inherited does not have a virtual destructor
components/library/localdatabase/src/sbLocalDatabaseMediaListListener.h:134: Class sbLocalDatabaseMediaListListener which is inherited does not have a virtual destructor

Soprano

backends/sesame2/jniobjectwrapper.h:36: Class JNIObjectWrapper does not have a virtual destructor
soprano-2.2.69/test/multithreadingtest.h:36: Class MultiThreadingTest does not have a virtual destructor

strongswan

src/libstrongswan/settings.c: Fix file descriptor leak on error
src/libfreeswan/datatot.c: Remove redundant assignment
src/libcharon/plugins/ha/ha_kernel.c: Fix file descriptor leak

Synecdoche

(fork of [[#BOINC]])
File descriptor leak in lib/shmem.C
Lots of cppcheck-inspired cleanup

TACO

lib/dbase/update_cli.c:387: Resource leak: file
lib/signal/DSSignal.c:1085: Overlapping data buffer tmp
lib/signal/MDSSignal_config.c:633: Memory leak: sig_res
lib/gen_api.c:1756: Memory leak: nethost_tmp
lib/tango/attr_api.cpp:71: Memory leak: attr
system/dbase/greta/greta_cb.c:717: Memory leak: text_class
system/dbase/greta/greta_cb.c:947: Overlapping data buffer filter_text
system/dbase/greta/greta_cb.c:955: Overlapping data buffer filter_text
system/dbase/greta/greta_misc.c:312: Resource leak: stream
system/dbase/greta/servutil.c:293: Memory leak: out
system/dbase/tools/db_fillup.cpp:272: Resource leak: file
system/dc/tools/dc_devall.c:260: Memory leak: dev_host
system/dc/tools/dc_mem.c:328: Memory leak: shm_name
system/dc/tools/dc_patch.c:287: Memory leak: shm_name

VLC

modules/access/gnomevfs.c:191: Mismatching allocation and deallocation
modules/mux/rtp/rtcp.c:512: Array index out of bounds
modules/misc/win32text.c:315: Memory leak: psz_string
modules/video_output/snapshot.c:278: Memory leak: p_snapshot
modules/demux/subtitle.c:2026: Memory leak: psz_text
extras/analyser/zsh.cpp:223: Memory leak: psz_arguments
libs/loader/ldt_keeper.c:220: Memory leak: ldt_fs
modules/access/rtsp/real_sdpplin.c:239: Several memory leaks
modules/codec/quicktime.c:861: Memory leak: p_sys
modules/control/rc.c:1781: Memory leak: psz_value
modules/demux/live555.cpp:787: Memory leak: tk
modules/codec/cmml/xtag.c:263: Memory leak: ret
modules/control/hotkeys.c:975: Memory leak: psz_bookmark
modules/control/http/mvar.c:453: Memory leak: psz
modules/misc/xml/xtag.c:510: Memory leak: ret
modules/gui/wxwidgets/dialogs/preferences_widgets.h:30: Base class ConfigControl doesn't have virtual destructor
modules/audio_filter/equalizer.c:529: Overlapping data buffer psz_newbands
modules/gui/qnx/vout.c:321: Memory leak: p_event
modules/gui/wxwidgets/extrapanel.cpp:802: Overlapping data buffer psz_values
modules/misc/lua/intf.c:230: Memory leak: psz_name
modules/stream_out/rtp.c:360: Memory leak: p_sys
src/control/mediacontrol_core.c:349: Memory leak: retval
src/libvlc.c:869: Overlapping data buffer psz_modules

Widelands

src/sound/sound_handler.cc:276 Using wrong variable

Wine

tools/fnt2fon.c:304: Memory leak: file_lens
tools/winedump/pe.c:1343: Memory leak: map
dlls/mciavi32/info.c:257: Dangerous usage of strncat
dlls/wineps.drv/mkagl.c:519: Resource leak: f_c
dlls/wineps.drv/mkagl.c:519: Resource leak: f_h
tools/fnt2bdf.c:219: Resource leak: fp

Wireshark

epan/dissectors/packet-giop.c:1488: Memory leak: saved_repoid
gtk/follow_ssl.c:176: Memory leak: follow_info
gtk/follow_udp.c:123: Memory leak: follow_info
epan/dissectors/packet-tacacs.c:871: Memory leak: tacplus_data
gtk/sctp_chunk_stat_dlg.c:328: Memory leak: col_arrows
gtk/sctp_error_dlg.c:230: Memory leak: col_arrows

Webkit

Virtual destructors missing

wxWidgets

src/msw/listctrl.cpp: 2927, Mismatching allocation and deallocation: indexArray
src/tiff/contrib/dbs/tiff-grayscale.c:89: Memory leak: gray
src/osx/carbon/window.cpp:586: Memory leak: uniChars
error in unix/mimetype
src/iodbc/info.c:126: Resource leak: fp

XBMC

3 memory leaks, 2 Buffer access out-of-bounds, realloc mistake, null point dereference

XFCE

../ui_plugin.c:427: Memory leak: translated_name

xine-lib

src/input/libdvdnav/remap.c:222: Resource leak: fp
src/input/pnm.c:715: Memory leak: mrl_ptr
src/libspucmml/xine_cmml_decoder.c:375: Memory leak: anchor_text
src/post/goom/gfontlib.c:130: Memory leak: gfont
src/xine-engine/video_overlay.c:607: Memory leak: this

XFree86

XServer/hw/xfree86/drivers/via/via_bios.c: Array index out of bounds


Related

Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.