Prevented infinite loop in skipBytes()
This commit is contained in:
parent
83c363481e
commit
ca9fab8330
|
@ -101,6 +101,9 @@ public class ID3Reader {
|
||||||
*/
|
*/
|
||||||
protected void skipBytes(InputStream input, int number) throws IOException {
|
protected void skipBytes(InputStream input, int number) throws IOException {
|
||||||
int skipped = 0;
|
int skipped = 0;
|
||||||
|
if (number <= 0) {
|
||||||
|
number = 1;
|
||||||
|
}
|
||||||
while (skipped < number) {
|
while (skipped < number) {
|
||||||
skipped += input.skip(number - skipped);
|
skipped += input.skip(number - skipped);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue