Skip to content

Stack overflow in shaka.util.StringUtils.fromUTF8 #335

Closed
@SomeJSGuy

Description

@SomeJSGuy

I'm having a stack overflow when parsing a large mpd because of the use of String.fromCharCode in /lib/util/string_utils.js, in lnie 39:

var utf8 = String.fromCharCode.apply(null, new Uint8Array(data));

Here are a few related cases I have found:

manuels/texlive.js#18
https://bugs.webkit.org/show_bug.cgi?id=80797

Also, in MDN it states that for higher values, it would be better to use String.fromCodePoint() than fromCharCode: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode.

Metadata

Metadata

Assignees

Labels

status: archivedArchived and locked; will not be updatedtype: bugSomething isn't working correctly

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions