Ignore:
Timestamp:
Oct 19, 2008, 4:08:46 PM (13 years ago)
Author:
Eugene Romanenko
Message:

PDF plugin: Poppler library updated to version 0.10.0

Location:
trunk/poppler/mypoppler/fofi
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/poppler/mypoppler/fofi/FoFiBase.cc

    r250 r257  
    44//
    55// Copyright 1999-2003 Glyph & Cog, LLC
     6//
     7//========================================================================
     8
     9//========================================================================
     10//
     11// Modified under the Poppler project - http://poppler.freedesktop.org
     12//
     13// All changes made under the Poppler project to this file are licensed
     14// under GPL version 2 or later
     15//
     16// Copyright (C) 2008 Ed Avis <eda@waniasset.com>
     17//
     18// To see a description of the changes please see the Changelog file that
     19// came with your tarball or type make ChangeLog if you are building from git
    620//
    721//========================================================================
  • trunk/poppler/mypoppler/fofi/FoFiTrueType.cc

    r254 r257  
    44//
    55// Copyright 1999-2003 Glyph & Cog, LLC
     6//
     7//========================================================================
     8
     9//========================================================================
     10//
     11// Modified under the Poppler project - http://poppler.freedesktop.org
     12//
     13// All changes made under the Poppler project to this file are licensed
     14// under GPL version 2 or later
     15//
     16// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
     17// Copyright (C) 2007 Koji Otani <sho@bbr.jp>
     18// Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
     19// Copyright (C) 2008 Albert Astals Cid <aacid@kde.org>
     20// Copyright (C) 2008 Tomas Are Haavet <tomasare@gmail.com>
     21//
     22// To see a description of the changes please see the Changelog file that
     23// came with your tarball or type make ChangeLog if you are building from git
    624//
    725//========================================================================
     
    337355  switch (cmaps[i].fmt) {
    338356  case 0:
    339     if (c >= cmaps[i].len - 6) {
     357    if (c + 6 >= (Guint)cmaps[i].len) {
    340358      return 0;
    341359    }
     
    885903  }
    886904
     905  if (tables == NULL) {
     906    return;
     907  }
     908
    887909  // check for missing tables
    888910  // (Note: if the OS/2 table is missing, the Microsoft PCL5 driver
     
    18911913  }
    18921914  nTables -= wrongTables;
    1893   tables = (TrueTypeTable *)greallocn(tables, nTables, sizeof(TrueTypeTable));
    1894   if (!parsedOk) {
     1915  tables = (TrueTypeTable *)greallocn_checkoverflow(tables, nTables, sizeof(TrueTypeTable));
     1916  if (!parsedOk || tables == NULL) {
    18951917    return;
    18961918  }
  • trunk/poppler/mypoppler/fofi/FoFiTrueType.h

    r250 r257  
    44//
    55// Copyright 1999-2003 Glyph & Cog, LLC
     6//
     7//========================================================================
     8
     9//========================================================================
     10//
     11// Modified under the Poppler project - http://poppler.freedesktop.org
     12//
     13// All changes made under the Poppler project to this file are licensed
     14// under GPL version 2 or later
     15//
     16// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
     17// Copyright (C) 2007 Koji Otani <sho@bbr.jp>
     18//
     19// To see a description of the changes please see the Changelog file that
     20// came with your tarball or type make ChangeLog if you are building from git
    621//
    722//========================================================================
  • trunk/poppler/mypoppler/fofi/FoFiType1.cc

    r250 r257  
    44//
    55// Copyright 1999-2003 Glyph & Cog, LLC
     6//
     7//========================================================================
     8
     9//========================================================================
     10//
     11// Modified under the Poppler project - http://poppler.freedesktop.org
     12//
     13// All changes made under the Poppler project to this file are licensed
     14// under GPL version 2 or later
     15//
     16// Copyright (C) 2005, 2008 Albert Astals Cid <aacid@kde.org>
     17// Copyright (C) 2005 Kristian HÞgsberg <krh@redhat.com>
     18//
     19// To see a description of the changes please see the Changelog file that
     20// came with your tarball or type make ChangeLog if you are building from git
    621//
    722//========================================================================
     
    1833#include "FoFiEncodings.h"
    1934#include "FoFiType1.h"
     35#include "poppler/Error.h"
    2036
    2137//------------------------------------------------------------------------
     
    206222           ++j, line = line1) {
    207223        if ((n = line1 - line) > 255) {
     224          error(-1, "FoFiType1::parse a line has more than 255 characters, we don't support this");
    208225          n = 255;
    209226        }
     
    215232          for (p2 = p; *p2 >= '0' && *p2 <= '9'; ++p2) ;
    216233          if (*p2) {
    217             c = *p2;
    218             *p2 = '\0';
     234            c = *p2; // store it so we can recover it after atoi
     235            *p2 = '\0'; // terminate p so atoi works
    219236            code = atoi(p);
    220237            *p2 = c;
     
    230247                ++p;
    231248                for (p2 = p; *p2 && *p2 != ' ' && *p2 != '\t'; ++p2) ;
    232                 *p2 = '\0';
     249                c = *p2; // store it so we can recover it after copyString
     250                *p2 = '\0'; // terminate p so copyString works
    233251                encoding[code] = copyString(p);
     252                *p2 = c;
     253                p = p2;
     254                for (; *p == ' ' || *p == '\t'; ++p); // eat spaces between string and put
     255                if (!strncmp(p, "put", 3)) {
     256                  // eat put and spaces and newlines after put
     257                  for (p += 3; *p == ' ' || *p == '\t' || *p == '\n' || *p == '\r'; ++p);
     258                  if (*p)
     259                  {
     260                    // there is still something after the definition
     261                    // there might be another definition in this line
     262                    // so move line1 to the end of our parsing
     263                    // so we start in the potential next definition in the next loop
     264                    line1 = &line[p - buf];
     265                  }
     266                } else {
     267                  error(-1, "FoFiType1::parse no put after dup");
     268                }
    234269              }
    235270            }
  • trunk/poppler/mypoppler/fofi/FoFiType1C.h

    r250 r257  
    44//
    55// Copyright 1999-2003 Glyph & Cog, LLC
     6//
     7//========================================================================
     8
     9//========================================================================
     10//
     11// Modified under the Poppler project - http://poppler.freedesktop.org
     12//
     13// All changes made under the Poppler project to this file are licensed
     14// under GPL version 2 or later
     15//
     16// Copyright (C) 2006 Takashi Iwai <tiwai@suse.de>
     17//
     18// To see a description of the changes please see the Changelog file that
     19// came with your tarball or type make ChangeLog if you are building from git
    620//
    721//========================================================================
Note: See TracChangeset for help on using the changeset viewer.