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.

mappings: [],
          hasShortCmap: false,
        };
      }
      let segment;
      let start = (file.start ? file.start : 0) + cmap.offset;
      file.pos = start;
      file.skip(2); 
      const numTables = file.getUint16();
      let potentialTable;
      let canBreak = false;
      
      
      
      
      
      
      for (let i = 0; i < numTables; i++) {
        const platformId = file.getUint16();
        const encodingId = file.getUint16();
        const offset = file.getInt32() >>> 0;
        let useTable = false;
        
        
        if (
          potentialTable &&
          potentialTable.platformId === platformId &&
          potentialTable.encodingId === encodingId
        ) {
          continue;