[Bug 176154] Possible memory corruption: ioctl overflowed 3rd argument

bugzilla at redhat.com bugzilla at redhat.com
Tue Dec 20 02:19:41 UTC 2005


Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug report.

Summary: Possible memory corruption: ioctl overflowed 3rd argument


https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=176154





------- Additional Comments From gkra at ucsd.edu  2005-12-19 21:19 EST -------
Well, Armin's last patch didn't work for me, but this did:

-----[ cut here ]-----
--- CDDB_get-2.25/CDDB_get.pm~  2005-06-15 10:55:23.000000000 -0400
+++ CDDB_get-2.25/CDDB_get.pm   2005-12-19 14:22:49.000000000 -0500
@@ -129,7 +129,7 @@

 sub read_toc {
   my $device=shift;
-  my $tochdr="";
+  my $tochdr=chr(0) x 16;

   sysopen (CD,$device, O_RDONLY | O_NONBLOCK) or die "cannot open cdrom [$!] [$device]";
   ioctl(CD, $CDROMREADTOCHDR, $tochdr) or die "cannot read toc [$!] [$device]";@@ -184,6 +184,7 
@@
     my ($min,$sec,$frame);
     unless($os =~ /BSD/) {
       $tocentry=pack "CCC", $i,0,$CDROM_MSF;
+      $tocentry.=chr(0) x 16;
       ioctl(CD, $CDROMREADTOCENTRY, $tocentry) or die "cannot read track $i info [$!] [$device]";
       ($min,$sec,$frame)=unpack "CCCC", substr($tocentry,4,4);
     } else {
-----[ cut here ]-----

-- 
Configure bugmail: https://bugzilla.redhat.com/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




More information about the Fedora-perl-devel-list mailing list