|
@@ 259-266 (lines=8) @@
|
| 256 |
|
$thisfile_id3v2['padding']['start'] = $framedataoffset; |
| 257 |
|
$thisfile_id3v2['padding']['length'] = strlen($framedata); |
| 258 |
|
$thisfile_id3v2['padding']['valid'] = true; |
| 259 |
|
for ($i = 0; $i < $thisfile_id3v2['padding']['length']; $i++) { |
| 260 |
|
if ($framedata{$i} != "\x00") { |
| 261 |
|
$thisfile_id3v2['padding']['valid'] = false; |
| 262 |
|
$thisfile_id3v2['padding']['errorpos'] = $thisfile_id3v2['padding']['start'] + $i; |
| 263 |
|
$info['warning'][] = 'Invalid ID3v2 padding found at offset '.$thisfile_id3v2['padding']['errorpos'].' (the remaining '.($thisfile_id3v2['padding']['length'] - $i).' bytes are considered invalid)'; |
| 264 |
|
break; |
| 265 |
|
} |
| 266 |
|
} |
| 267 |
|
break; // skip rest of ID3v2 header |
| 268 |
|
} |
| 269 |
|
if ($id3v2_majorversion == 2) { |
|
@@ 321-328 (lines=8) @@
|
| 318 |
|
$thisfile_id3v2['padding']['valid'] = true; |
| 319 |
|
|
| 320 |
|
$len = strlen($framedata); |
| 321 |
|
for ($i = 0; $i < $len; $i++) { |
| 322 |
|
if ($framedata{$i} != "\x00") { |
| 323 |
|
$thisfile_id3v2['padding']['valid'] = false; |
| 324 |
|
$thisfile_id3v2['padding']['errorpos'] = $thisfile_id3v2['padding']['start'] + $i; |
| 325 |
|
$info['warning'][] = 'Invalid ID3v2 padding found at offset '.$thisfile_id3v2['padding']['errorpos'].' (the remaining '.($thisfile_id3v2['padding']['length'] - $i).' bytes are considered invalid)'; |
| 326 |
|
break; |
| 327 |
|
} |
| 328 |
|
} |
| 329 |
|
break; // skip rest of ID3v2 header |
| 330 |
|
} |
| 331 |
|
|