Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: cea608 parser make sure pos is within bounds of chars array which has size of NR_COLS#7666

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
chelleccarlyle wants to merge1 commit intovideo-dev:master
base:master
Choose a base branch
Loading
fromchelleccarlyle:fix/cea-setPenStyles-index-out-of-bounds-chars

Conversation

@chelleccarlyle
Copy link

@chelleccarlylechelleccarlyle commentedDec 4, 2025
edited
Loading

This PR will...

Fix bounds checks in theRow class:setCursor() clamps positions >=NR_COLS toNR_COLS - 1 (0-indexed), and add bounds checks insetPenStyles(),moveCursor(), andbackSpace() to prevent accessingthis.chars beyond valid indices (0-99 whenNR_COLS is 100), avoidingTypeError when accessing undefined array elements. Also adds unit tests file for cea608 parser.

Why is this Pull Request needed?

Our player is getting type error of undefined when trying to access this.chars[this.pos] or this.chars[i] when index is 100 (should be 99 since 0 based) and trying to call this.chars[i].setPenStyles() which is causing fatal error in our player and causing playback to crash midstream within a few seconds to few minutes.

ex.TypeError: Cannot read properties of undefined (reading 'setPenState') at Row.setPenStyles happening in node_modules/hls.js/dist/hls.mjs

Are there any points in the code the reviewer needs to double check?

No, this PR is mainly adding resiliency to setCursor() and moveCursor() logic of iterating through this.chars array.

Resolves issues:

#7665

Checklist

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • API or design changes are documented in API.md

…ure pos is within bounds of nr cols array which is 100 and should be 0 index based
@robwalchrobwalch added this to the1.7.0 milestoneDec 4, 2025
@chelleccarlylechelleccarlyle changed the titlefix: Updated cursor position clamping logic in and methods and make…fix: cea608 parser make sure pos is within bounds of chars array which has size of NR_COLSDec 4, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

Milestone

1.7.0

Development

Successfully merging this pull request may close these issues.

2 participants

@chelleccarlyle@robwalch

[8]ページ先頭

©2009-2025 Movatter.jp