~ubuntu-branches/ubuntu/dapper/poppler/dapper-security

« back to all changes in this revision

Viewing changes to poppler/CharCodeToUnicode.cc

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2006-03-06 18:42:44 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060306184244-oomqyiqr7cgncp2c
Tags: 0.5.1-0ubuntu1
* New upstream version:
  - Support for embedded files.
  - Handle 0-width lines correctly.
  - Avoid external file use when opening fonts.
  - Only use vector fonts returned from fontconfig (#5758).
  - Fix scaled 1x1 pixmaps use for drawing lines (#3387).
  - drawSoftMaskedImage support in cairo backend.
  - Misc bug fixes: #5922, #5946, #5749, #5952, #4030, #5420.
* debian/control.in, debian/libpoppler0c2.dirs, 
  debian/libpoppler0c2-glib.dirs, debian/libpoppler0c2-glib.install,
  debian/libpoppler0c2.install, debian/libpoppler0c2-qt.dirs,
  debian/libpoppler0c2-qt.install, debian/rules:
  - updated for the soname change
* debian/patches/000_splash_build_fix.patch:
  - fix build when using splash
* debian/patches/001_fixes_for_fonts_selection.patch:
  - fix with the new version

Show diffs side-by-side

added added

removed removed

Lines of Context:
243
243
        }
244
244
        if (!(n1 == 2 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>' &&
245
245
              tok2[0] == '<' && tok2[n2 - 1] == '>')) {
246
 
          error(-1, "Illegal entry in bfchar block in ToUnicode CMap");
247
 
          continue;
 
246
          
 
247
          // check there was no line jump inside the token and so the length is 
 
248
          // longer than it should be
 
249
          int countAux = 0;
 
250
          for (int k = 0; k < n1; k++)
 
251
            if (tok1[k] != '\n' && tok1[k] != '\r') countAux++;
 
252
        
 
253
          if (!(countAux == 2 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>' &&
 
254
              tok2[0] == '<' && tok2[n2 - 1] == '>')) {
 
255
            error(-1, "Illegal entry in bfchar block in ToUnicode CMap");
 
256
            continue;
 
257
          }
248
258
        }
249
259
        tok1[n1 - 1] = tok2[n2 - 1] = '\0';
250
260
        if (sscanf(tok1 + 1, "%x", &code1) != 1) {
268
278
        }
269
279
        if (!(n1 == 2 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>' &&
270
280
              n2 == 2 + nDigits && tok2[0] == '<' && tok2[n2 - 1] == '>')) {
271
 
          error(-1, "Illegal entry in bfrange block in ToUnicode CMap");
272
 
          continue;
 
281
          // check there was no line jump inside the token and so the length is 
 
282
          // longer than it should be
 
283
          int countAux = 0;
 
284
          for (int k = 0; k < n1; k++)
 
285
            if (tok1[k] != '\n' && tok1[k] != '\r') countAux++;
 
286
          
 
287
          int countAux2 = 0;
 
288
          for (int k = 0; k < n1; k++)
 
289
            if (tok2[k] != '\n' && tok2[k] != '\r') countAux++;
 
290
          
 
291
          if (!(countAux == 2 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>' &&
 
292
              countAux2 == 2 + nDigits && tok2[0] == '<' && tok2[n2 - 1] == '>')) {
 
293
            error(-1, "Illegal entry in bfrange block in ToUnicode CMap");
 
294
            continue;
 
295
          }
273
296
        }
274
297
        tok1[n1 - 1] = tok2[n2 - 1] = '\0';
275
298
        if (sscanf(tok1 + 1, "%x", &code1) != 1 ||