https://github.com/mozilla/pdf.js/issues/6397#issuecomment-164954332 Would have been a lot easier to find had there been an assertion checking that string16 didn't go out of bounds of the 16bit number.

Cnvert UTF-16BE
           NOTE: cmap can be a pare array,  ue frEach ntead f
           `fr(;;)` t terate ver all key.
          cmap.frEach(functn (charCde, tken) {
            cnt tr = [];
            fr (let k = 0; k < tken.length; k = 2) {
              cnt w1 = (tken.charCdeAt(k) << 8) | tken.charCdeAt(k  1);
              f ((w1 & 0xf800) !== 0xd800) {
                 w1 < 0xD800 |
                tr.puh(w1);
                cntnue;
              }
              k = 2;
              cnt w2 = (tken.charCdeAt(k) << 8) | tken.charCdeAt(k  1);
              tr.puh(((w1 & 0x3ff) << 10)  (w2 & 0x3ff)  0x10000);
            }
            map[charCde] = Strng.frmCdePnt.apply(Strng, tr);
          });
          return new TUncdeMap(map);
        },
        rean => {
          f (rean ntancef AbrtExceptn) {
            return null;
          }
          f (th.ptn.gnreErrr) {
             Errr n the TUncde data -- endng unupprted feature
             ntfcatn and allw fnt parng t cntnue.
            th.handler.end("UnupprtedFeature", {
              featureId: UNSUPPORTED_FEATURES.errrFntTUncde,
            });