43081j / 43081j/id3

Index out of range [when parsing images]

Open
#10 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
344
Forks
66
PR merge metrics
No merged PRs in 30d

Description

The parser freaks out on some embedded images, it seems completely random as to what images do and don't trip it:

```
Uncaught node.js Error

Error: Index out of range.
at Object.ID3Frame.parse (/home/damon/projects/tunes/node_modules/id3js/dist/id3.js:696:13)
at eval (/home/damon/projects/tunes/node_modules/id3js/dist/id3.js:943:24)
at eval (/home/damon/projects/tunes/node_modules/id3js/dist/id3.js:118:4)
at Object.wrapper [as oncomplete] (fs.js:454:17)
```

An example of one it's breaking on: http://pastebin.com/1RRDqknW

As you can see it kinda just cuts off part way through parsing the image.

If I delete the image from the ID3 tag, it parses that file fine and then breaks on a later one.

The only thing the breaking images seem to have had in common is that they're mostly fairly high res (both this and the previous one were 800x800) though there have been ones smaller such as 400x360 which have broken in the same way.

There should really be an option to skip parsing images so those getting this issue can just bypass the image parsing and so this module will still be usable.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.