Re: isomd5sum-1.0.12 bug report

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 28, 2014 at 04:15:53PM -0800, Brian C. Lane wrote:
> On Sat, Jan 18, 2014 at 11:28:54AM +0000, David Binderman wrote:
> > Hello there,
> > 
> > I just ran the static analysis tool cppcheck over
> > the source code of isomd5sum-1.0.12
> > 
> > It said many things, including
> > 
> > 1.
> > 
> > [libcheckisomd5.c:106] -> [libcheckisomd5.c:106]: (warning) Array 'buf2[512]' accessed at index 512, which is out of bounds.
> > 
> > Source code is
> > 
> >             for (p=tmpbuf; buf2[loc] != ';' && loc < 512; p++, loc++)
> > 
> > I suspect 
> > 
> >             for (p=tmpbuf; loc < 512 && buf2[loc] != ';' ; p++, loc++)
> > 
> > might be better code.
> > 
> > 2.
> > 
> > [libcheckisomd5.c:144] -> [libcheckisomd5.c:144]: (warning) Array 'buf2[512]' accessed at index 512, which is out of bounds. 
> > 
> > Duplicate.
> 
> Thanks, that looks like a good fix. How did you get cppcheck to complain
> about it? I ran cppcheck --enable=all . in the isomd5sum git repo and it
> just complains about a few style issues.

Nevermind, -v adds a bunch of detail to the output.


-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list





[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux