Bad regex expressing in module.audio.dss.php

Locked
bigdaz
User
Posts:3
Joined:Wed Feb 09, 2011 9:39 pm
Are you a spambot?:no
Location:Kimberley, BC, Canada
Bad regex expressing in module.audio.dss.php

Post by bigdaz » Mon Jun 13, 2011 9:25 pm

G'day

I finally got around to testing v1.8.5; thanks for incorporating the changes I supplied in a previous report.
Everything is working great, except there is a minor problem in the regex for parsing the header of DSS files: the trailing '#' is missing from the expression. This patch will fix the problem:

--- a/_lib/server/getid3-1.8.5/getid3/module.audio.dss.php
+++ b/_lib/server/getid3-1.8.5/getid3/module.audio.dss.php
@@ -22,7 +22,7 @@ class getid3_dss
fseek($fd, $ThisFileInfo['avdataoffset'], SEEK_SET);
$DSSheader = fread($fd, 1256);

- if (!preg_match('#^(\x02|\x03)dss', $DSSheader)) {
+ if (!preg_match('#^(\x02|\x03)dss#', $DSSheader)) {
$ThisFileInfo['error'][] = 'Expecting "[x02-x03]dss" at offset '.$ThisFileInfo['avdataoffset'].', found "'.substr($DSSheader,
return false;
}


Thanks for all your hard work. It's really appreciated.
Daz

James Heinrich
getID3() v1 developer
Posts:1477
Joined:Fri May 04, 2001 4:00 pm
Are you a spambot?:no
Location:Northern Ontario, Canada
Contact:

Re: Bad regex expressing in module.audio.dss.php

Post by James Heinrich » Mon Jun 20, 2011 4:29 pm

Already fixed in v1.9.0, but thanks.

Locked