mozilla/pdf.js — pull request #4365 by fkaelberer (2014-03-02 20:48:47+00:00)
Title: Fix parsing of JP2 images

Fixes #2788. Issue #2745 displays now, but shows a warning.

The issues above contain JP2 images which are embedded without a JP2 signature box. Instead, the contiguous codestream starts immediately (with bytes 0xFF4F = SOC (start of codestream)).
This is also the behavior when converting a [jp2 image](http://www.gwg.nga.mil/ntb/baseline/software/testfile/Jpeg2000/p0_01/p0_01.j2k) to PDF using Adobe Acrobat 8, so the examples above are not exotic.

This PR checks for the 'start of codestream' header before parsing for box headers, fixes an infinite loop in Line 267, and the remaining changes are only curly braces.