This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

cppcheck bugs


Hello,

you ever run a static code analysis tool on cygwin sources. I have done that! I used cppcheck (http://sourceforge.net/apps/mediawiki/cppcheck/index.php?title=Main_Page) and got the following SEVERE warning messages:

[fgetws.c:137]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[vfscanf.c:336]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[vfwscanf.c:1064]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[vfwscanf.c:326]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[ungetc.c:185]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../posix/glob.c:479]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../posix/glob.c:560]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../posix/regcomp.c:2005]: (Error) Memory leak: pmatches
[../argz/argz_insert.c:31]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../locale/ldpart.c:140]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../locale/ldpart.c:124]: (Error) Deallocating a deallocated pointer: lbuf
[../stdlib/mallocr.c:2991]: (Error) Memory leak: newmem
[../machine/mips/strncpy.c:205]: (Error) Array index -4 corresponds with 4294967292, which is likely out of bounds
[../machine/mips/strncpy.c:206]: (Error) Array index -3 corresponds with 4294967293, which is likely out of bounds
[../machine/mips/strncpy.c:208]: (Error) Array index -2 corresponds with 4294967294, which is likely out of bounds
[../machine/mips/strncpy.c:209]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../machine/mips/strcmp.c:43]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../machine/powerpc/vfscanf.c:953]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../search/hash_buf.c:153]: (Error) Uninitialized variable: segment_ndx
[../sys/sysvi386/crt0.c:82]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../sys/linux/iconv/gconv_trans.c:223]: (Error) Memory leak: newp
[../sys/linux/iconv/gconv_conf.c:566]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../sys/linux/dl/dl-deps.c:167]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../sys/linux/dl/dl-deps.c:170]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../sys/linux/dl/dl-object.c:143]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../sys/linux/dl/dl-profile.c:360]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../sys/linux/dl/dl-profile.c:369]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../sys/linux/mq_open.c:98]: (Error) Resource leak: fd
[../sys/linux/net/nsswitch.c:446]: (Error) Resource leak: fp
[../sys/linux/net/ether_line.c:68]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../sys/linux/mntent_r.c:242]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../sys/linux/scandir64.c:95]: (Error) Resource leak: dirp
[../sys/linux/ftw.c:406]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../sys/linux/ftw.c:503]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../sys/linux/ftw.c:510]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../sys/linux/intl/plural.c:852]: (Error) Array index -4 corresponds with 4294967292, which is likely out of bounds
[../sys/linux/intl/plural.c:852]: (Error) Array index -2 corresponds with 4294967294, which is likely out of bounds
[../sys/linux/intl/plural.c:858]: (Error) Array index -2 corresponds with 4294967294, which is likely out of bounds
[../sys/linux/intl/plural.c:864]: (Error) Array index -2 corresponds with 4294967294, which is likely out of bounds
[../sys/linux/intl/plural.c:870]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../sys/linux/intl/plural.c:870]: (Error) Array index -2 corresponds with 4294967294, which is likely out of bounds
[../sys/linux/intl/plural.c:876]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../sys/linux/intl/plural.c:876]: (Error) Array index -2 corresponds with 4294967294, which is likely out of bounds
[../sys/linux/intl/plural.c:882]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../sys/linux/intl/plural.c:882]: (Error) Array index -2 corresponds with 4294967294, which is likely out of bounds
[../sys/linux/intl/plural.c:888]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../sys/linux/intl/plural.c:888]: (Error) Array index -2 corresponds with 4294967294, which is likely out of bounds
[../sys/linux/intl/plural.c:913]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../sys/sparc64/scandir.c:81]: (Error) Resource leak: dirp
[../string/wcstok.c:139]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../string/strtok_r.c:59]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../string/strtok_r.c:83]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../doc/makedoc.c:1009]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../doc/makedoc.c:1010]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../doc/makedoc.c:1341]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/utils/mount.cc:93]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/utils/mount.cc:600]: (possible style) Non-empty string test can be simplified to "*user != '\0'"
[../../../winsup/utils/mount.cc:602]: (possible style) Non-empty string test can be simplified to "*system != '\0'"
[../../../winsup/utils/path.cc:518]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/utils/strace.cc:237]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/utils/strace.cc:391]: (Error) Array index -2 corresponds with 4294967294, which is likely out of bounds
[../../../winsup/utils/strace.cc:392]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/utils/dump_setup.cc:154]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/utils/dump_setup.cc:445]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/utils/dump_setup.cc:153]: (Error) Uninitialized variable: buf
[../../../winsup/utils/cygpath.cc:293]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/utils/cygpath.cc:527]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/utils/cygpath.cc:1106]: (Error) Resource leak: fp
[../../../winsup/utils/cygcheck.cc:257]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/utils/cygcheck.cc:709]: (Error) Memory leak: sections
[../../../winsup/utils/cygcheck.cc:1161]: (Error) Mismatching allocation and deallocation: f
[../../../winsup/utils/cygcheck.cc:1168]: (Error) Mismatching allocation and deallocation: f
[../../../winsup/utils/cygcheck.cc:1159]: (Error) Resource leak: f
[../../../winsup/mingw/mingwex/gdtoa/strtodg.c:143]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/mingw/mingwex/gdtoa/arithchk.c:182]: (Error) Resource leak: f
[../../../winsup/mingw/profile/gmon.c:108]: (Error) Memory leak: cp
[../../../winsup/mingw/profile/gmon.c:265]: (Error) Resource leak: log
[../../../winsup/cygwin/cygtls.h:220]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/security.h:158]: (possible style) Member variable 'cygsid::well_known_sid' is not assigned a value in 'cygsid::operator='
[../../../winsup/cygwin/security.h:158]: (possible style) Member variable 'cygsid::sbuf' is not assigned a value in 'cygsid::operator='
[../../../winsup/cygwin/gmon.c:257]: (Error) Resource leak: log
[../../../winsup/cygwin/mount.cc:747]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/mount.cc:1067]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/mount.cc:1301]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/mount.cc:1302]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/mount.cc:1303]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/mount.cc:1304]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/regex/regcomp.c:1806]: (Error) Memory leak: pmatches
[../../../winsup/cygwin/child_info.h:65]: (Error) Class child_info which is inherited by class child_info_spawn does not have a virtual destructor
[../../../winsup/cygwin/fhandler.cc:1179]: (Style) C-style pointer casting
[../../../winsup/cygwin/fhandler.cc:322]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/strsep.cc:57]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/flock.cc:888]: (Style) C-style pointer casting
[../../../winsup/cygwin/flock.cc:532]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/path.cc:734]: (Style) C-style pointer casting
[../../../winsup/cygwin/path.cc:231]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/path.cc:262]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/path.cc:660]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/path.cc:1000]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/path.cc:1167]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/path.cc:1180]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/path.cc:1186]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/path.cc:1196]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/path.cc:1196]: (Error) Array index -2 corresponds with 4294967294, which is likely out of bounds
[../../../winsup/cygwin/path.cc:1215]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/path.cc:1215]: (Error) Array index -2 corresponds with 4294967294, which is likely out of bounds
[../../../winsup/cygwin/path.cc:3093]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/path.cc:3272]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/path.cc:3296]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/path.cc:2819]: (Error) Memory leak: to
[../../../winsup/cygwin/random.cc:361]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/random.cc:365]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/random.cc:367]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/random.cc:430]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/random.cc:433]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/random.cc:435]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/glob.cc:834]: (Style) The scope of the variable i can be reduced
[../../../winsup/cygwin/glob.cc:496]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/glob.cc:574]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/strace.cc:88]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/strace.cc:90]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/strace.cc:182]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/strace.cc:185]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/strace.cc:213]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/net.cc:284]: (Style) C-style pointer casting
[../../../winsup/cygwin/net.cc:2000]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/net.cc:2201]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/sec_auth.cc:805]: (Style) The scope of the variable psize can be reduced
[../../../winsup/cygwin/sec_auth.cc:119]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/lib/libcmain.c:29]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds
[../../../winsup/cygwin/syscalls.cc:3922]: (Style) C-style pointer casting
[../../../winsup/cygwin/syscalls.cc:4030]: (Error) Array index -1 corresponds with 4294967295, which is likely out of bounds


Best regards

Martin

-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]