~ubuntu-branches/ubuntu/precise/libxfont/precise-security

« back to all changes in this revision

Viewing changes to src/bitmap/pcfread.c

  • Committer: Bazaar Package Importer
  • Author(s): Julien Cristau
  • Date: 2008-03-07 13:32:43 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20080307133243-oe2mgbme0mqtwihp
Tags: 1:1.3.2-1
* New upstream release
* Drop CVE-2008-0006.diff, included upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
588
588
    pFont->info.lastRow = pcfGetINT16(file, format);
589
589
    pFont->info.defaultCh = pcfGetINT16(file, format);
590
590
    if (IS_EOF(file)) goto Bail;
 
591
    if (pFont->info.firstCol > pFont->info.lastCol ||
 
592
       pFont->info.firstRow > pFont->info.lastRow ||
 
593
       pFont->info.lastCol-pFont->info.firstCol > 255) goto Bail;
591
594
 
592
595
    nencoding = (pFont->info.lastCol - pFont->info.firstCol + 1) *
593
596
        (pFont->info.lastRow - pFont->info.firstRow + 1);
726
729
    pFontInfo->lastRow = pcfGetINT16(file, format);
727
730
    pFontInfo->defaultCh = pcfGetINT16(file, format);
728
731
    if (IS_EOF(file)) goto Bail;
 
732
    if (pFontInfo->firstCol > pFontInfo->lastCol ||
 
733
       pFontInfo->firstRow > pFontInfo->lastRow ||
 
734
       pFontInfo->lastCol-pFontInfo->firstCol > 255) goto Bail;
729
735
 
730
736
    nencoding = (pFontInfo->lastCol - pFontInfo->firstCol + 1) *
731
737
        (pFontInfo->lastRow - pFontInfo->firstRow + 1);