Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typo in core/jpx.js #5227

Closed
xiemaisi opened this issue Aug 21, 2014 · 5 comments
Closed

Typo in core/jpx.js #5227

xiemaisi opened this issue Aug 21, 2014 · 5 comments

Comments

@xiemaisi
Copy link

Lines 534--539 (https://github.com/mozilla/pdf.js/blob/master/src/core/jpx.js#L538) read

    subband.codeblockParameters = {
      codeblockWidth: xcb_,
      codeblockHeight: ycb_,
      numcodeblockwide: cbx1 - cbx0 + 1,
      numcodeblockhigh: cby1 - cby1 + 1
    };

Note that numcodeblockhigh is always initialised to 1. Presumably, it should be initialised to this instead:

      numcodeblockhigh: cby1 - cby0 + 1
@yurydelendik
Copy link
Contributor

Yep, looks like a typo. Do you want any PDFs it might fix?

@xiemaisi
Copy link
Author

I found this using a static analysis tool, so I'm not sure when (or whether) this would actually be a problem in practice.

@yurydelendik
Copy link
Contributor

thanks

@yurydelendik
Copy link
Contributor

I found this using a static analysis tool,

@xiemaisi very interesting, can you tell the name of the tool? :)

@xiemaisi
Copy link
Author

It's a new static analyser we are developing at Semmle (http://semmle.com/). Proprietary, I'm afraid...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants