Thanks; I fixed a few of these. Some of them are false positives, or things we don't bother with (like checking for malloc() returning NULL) -- David
On 08-Jan-2014 11:33 AM, Toralf Förster wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 It discovers a flaw in X (http://lists.x.org/archives/xorg-announce/2014-January/002389.html) so I gave it a try to the current git tree of boinc. And b/c the tool claims at its home page that it doesn't produce false positive I think it is worth to report the output here, or ? tfoerste@n22 ~/devel/boinc-v2 $ cppcheck ./ --force --quiet [client/rrsim_test.cpp:311]: (error) Same iterator is used with different containers 'active' and 'active'. [clientgui/browser.cpp:735]: (warning) %I64d in format string (no. 1) requires '__int64 *' but the argument type is 'long *'. [clientgui/mac/SetupSecurity.cpp:977]: (error) Array 'ourAuthRightsItem[3]' accessed at index 3, which is out of bounds. [clientgui/mac/SetupSecurity.cpp:978]: (error) Array 'ourAuthRightsItem[3]' accessed at index 3, which is out of bounds. [clientgui/mac/SetupSecurity.cpp:979]: (error) Array 'ourAuthRightsItem[3]' accessed at index 3, which is out of bounds. [clientgui/mac/SetupSecurity.cpp:980]: (error) Array 'ourAuthRightsItem[3]' accessed at index 3, which is out of bounds. [clientgui/mac/SetupSecurity.cpp:982]: (error) Array 'ourAuthRightsItem[3]' accessed at index 4, which is out of bounds. [clientgui/mac/SetupSecurity.cpp:983]: (error) Array 'ourAuthRightsItem[3]' accessed at index 4, which is out of bounds. [clientgui/mac/SetupSecurity.cpp:984]: (error) Array 'ourAuthRightsItem[3]' accessed at index 4, which is out of bounds. [clientgui/mac/SetupSecurity.cpp:985]: (error) Array 'ourAuthRightsItem[3]' accessed at index 4, which is out of bounds. [db/boinc_db.cpp:61]: (error) Using 'memset' on struct that contains a 'std::vector'. [dcapi/condor/condor_utils.c:186]: (error) Common realloc mistake: 'buf' nulled but not freed upon failure [dcapi/condor/condor_utils.c:338]: (error) Common realloc mistake: 'dn' nulled but not freed upon failure [dcapi/condor/condor_utils.c:376]: (error) Common realloc mistake: 'buf' nulled but not freed upon failure [dcapi/condor/tc.c:45]: (error) Common realloc mistake: 'buf' nulled but not freed upon failure [dcapi/condor/tm.c:240]: (error) Uninitialized variable: s [dcapi/local/local_utils.c:190]: (error) Common realloc mistake: 'buf' nulled but not freed upon failure [dcapi/local/local_utils.c:342]: (error) Common realloc mistake: 'dn' nulled but not freed upon failure [dcapi/local/local_utils.c:380]: (error) Common realloc mistake: 'buf' nulled but not freed upon failure [lib/mac/QMachOImageList.c:364]: (error) Uninitialized variable: elemCount [lib/mac/QMachOImageList.c:365]: (error) Uninitialized variable: elemSize [lib/procinfo_mac.cpp:118]: (warning) %ld in format string (no. 5) requires 'long *' but the argument type is 'unsigned long *'. [lib/run_app_windows.cpp:585]: (error) Possible null pointer dereference: pCEB [lib/unix_util.cpp:83]: (error) Common realloc mistake: 'buf' nulled but not freed upon failure [samples/condor/boinc_gahp.cpp:783]: (error) Common realloc mistake: 'p' nulled but not freed upon failure [samples/image_libs/tgalib.cpp:126]: (error) Memory leak: pImageData [samples/image_libs/tgalib.cpp:126]: (error) Resource leak: pFile [samples/image_libs/tgalib.cpp:126]: (error) Memory leak: pImageData.data [samples/nvcuda/cuda.cpp:114]: (warning) %f in format string (no. 1) requires 'float *' but the argument type is 'double *'. [samples/vboxwrapper/floppyio.cpp:199]: (error) Memory leak: dataToSend [samples/vboxwrapper/floppyio.cpp:263]: (error) Memory leak: dataToReceive [samples/worker/worker.cpp:78]: (error) Resource leak: in [samples/worker/worker.cpp:78]: (error) Resource leak: out [sched/plan_class_spec.cpp:822]: (error) printf format string requires 1 parameter but only 0 are given. [sched/sched_files.cpp:58]: (error) Resource leak: f [sched/sched_main.cpp:475]: (error) Memory leak: stderr_buffer [sched/sched_shmem.cpp:149]: (error) Resource leak: f [sched/sched_timezone.cpp:132]: (error) Common realloc mistake: 'cached' nulled but not freed upon failure [sched/sched_types.cpp:602]: (error) Using 'memset' on struct that contains a 'std::vector'. [sched/size_regulator.cpp:133]: (error) Uninitialized variable: action [sched/target_batch.cpp:134]: (error) Width 256 given in format string (no. 1) is larger than destination buffer 'batch_str[256]', use %255s to prevent overflowing it. [win_build/installerv2/redist/Windows/src/boinccas/password.cpp:120]: (error) Mismatching allocation and deallocation: pTRandomPwd [zip/unzip/crypt.c:622]: (error) Invalid number of character (() when these macros are defined: 'UTIL;ZIP;ZIP10'. [zip/unzip/unix/unix.c:146]: (error) Invalid number of character (() when these macros are defined: 'NO_DIR'. [zip/unzip/win32/win32.c:2463]: (error) Memory leak: tmproot [zip/unzip/win32/win32.c:1711]: (error) Uninitialized variable: pathcomp [zip/zip/unix/z_unix.c:760]: (error) mismatching number of '(' and ')' in this line: defined(__NETBSD__)) [zip/zip/zip.c:4008]: (error) Memory leak: zipbuf [zip/zip/zip.c:4619]: (error) Memory leak: fn [zip/zip/zip.c:1330]: (error) Invalid number of character ({) when these macros are defined: '__human68k__'. [zip/zip/zipfile.c:2271]: (error) Memory leak: locz [zip/zip/zipfile.c:6137]: (error) Memory leak: localz [zip/zip/zipfile.c:3753]: (error) Memory leak: cz.iname [zip/zip/zipfile.c:6175]: (error) Memory leak: localz.iname [zip/zip/zipfile.c:404]: (error) Uninitialized variable: q [zip/zip/zipup.c:610]: (error) Memory leak: tempextra [zip/zip/zipup.c:610]: (error) Memory leak: tempcextra [zip/zip/zipup.c:596]: (error) Memory leak: tempextra [zip/zip/zipup.c:596]: (error) Memory leak: tempcextra - -- MfG/Sincerely Toralf Förster pgp finger print:1A37 6F99 4A9D 026F 13E2 4DCF C4EA CDDE 0076 E94E -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iF4EAREIAAYFAlLNp/gACgkQxOrN3gB26U6FggD/VE1A4GTfffkj0Mx3Ype4q1iU tP7H15suSnbIg4F7KrsA/RB4c4eE3AtYgLIosh8S0E5ZGur3um6MRGULNcMNLSim =zAYj -----END PGP SIGNATURE----- _______________________________________________ boinc_dev mailing list [email protected] http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev To unsubscribe, visit the above URL and (near bottom of page) enter your email address.
_______________________________________________ boinc_dev mailing list [email protected] http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev To unsubscribe, visit the above URL and (near bottom of page) enter your email address.
