~ubuntu-branches/ubuntu/vivid/ghostscript/vivid-security

« back to all changes in this revision

Viewing changes to base/gxtype1.c

  • Committer: Package Import Robot
  • Author(s): Till Kamppeter
  • Date: 2013-08-09 20:01:36 UTC
  • mfrom: (1.1.37)
  • Revision ID: package-import@ubuntu.com-20130809200136-amb6zrr7hnjb5jq9
Tags: 9.08~rc1~dfsg-0ubuntu1
* New upstream release
   - Ghostscript 9.08rc1.
   - We are using the system's liblcms2 and libopenjpeg now.
* debian/patches/020130401-852e545-pxl-xl-driver-produced-drawing-commands-without-setting-color-space.patch:
  Removed patch backported from upstream.
* debian/patches/ojdk-8007925+8007926.patch,
  debian/patches/ojdk-8007927.patch,
  debian/patches/ojdk-8007929.patch,
  debian/patches/ojdk-8009654.patch: Removed patches on build in liblcms2, we
  use the system's liblcms2 now.
* debian/patches/2001_docdir_fix_for_debian.patch: Manually updated to new
  upstream source code.
* debian/patches/2003_support_multiarch.patch: Refreshed with quilt.
* debian/control: Added build dependencies on liblcms2-dev and
  libopenjpeg-dev.
* debian/rules: Check for removed lcms2/ and openjpeg/ subdirectories in
  the repackaging check again, also set build options for shared liblcms2
  and libopenjpeg libraries.
* debian/rules: Makefile.in and configure.ac are in the root directory of
  the source now and do not need to get linked from base/. Also there is no
  gstoraster and gstopxl CUPS filter in the package any more and no
  "install-cups" make target any more.
* debian/control, debian/rules, debian/ghostscript-cups.install,
  debian/ghostscript-cups.ppd-updater: Removed the ghostscript-cups binary
  package. The files are now provided by cups-filters.
* debian/symbols.common: Updated for new upstream source. Applied patch
  which dpkg-gensymbols generated for debian/libgs9.symbols to this file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
371
371
    const byte *cip, *end;
372
372
    crypt_state state;
373
373
    int c, hhints = 0, vhints = 0;
374
 
    int code;
 
374
    int code, call_depth = 0;
375
375
 
376
376
    CLEAR_CSTACK(cstack, csp);
377
377
    cip = pgd->bits.data;
450
450
            }
451
451
            break;
452
452
        case c2_callgsubr:
453
 
            c = fixed2int_var(*csp) + pdata->gsubrNumberBias;
 
453
            call_depth++;
 
454
            if (csp < &(cstack[0])) {
 
455
                c = pdata->gsubrNumberBias;
 
456
            }
 
457
            else {
 
458
                c = fixed2int_var(*csp) + pdata->subroutineNumberBias;
 
459
            }
454
460
            code = pdata->procs.subr_data
455
461
                (pfont, c, true, &ipsp[1].cs_data);
456
462
            if (code < 0)
457
463
                return_error(code);
458
 
            --csp;
 
464
            if (csp >= &(cstack[0])) {
 
465
                --csp;
 
466
            }
459
467
            ipsp->ip = cip, ipsp->dstate = state, ipsp->ip_end = end;
460
468
            ++ipsp;
461
469
            cip = ipsp->cs_data.bits.data;
462
470
            end = ipsp->cs_data.bits.data + ipsp->cs_data.bits.size;
463
471
            goto call;
464
472
        case c_callsubr:
465
 
            c = fixed2int_var(*csp) + pdata->subroutineNumberBias;
 
473
            call_depth++;
 
474
            if (csp < &(cstack[0])) {
 
475
                c = pdata->subroutineNumberBias;
 
476
            }
 
477
            else {
 
478
                c = fixed2int_var(*csp) + pdata->subroutineNumberBias;
 
479
            }
466
480
            code = pdata->procs.subr_data
467
481
                (pfont, c, false, &ipsp[1].cs_data);
468
482
            if (code < 0)
469
483
                return_error(code);
470
 
            --csp;
 
484
            if (csp >= &(cstack[0])) {
 
485
                --csp;
 
486
            }
471
487
            ipsp->ip = cip, ipsp->dstate = state, ipsp->ip_end = end;
472
488
            ++ipsp;
473
489
            cip = ipsp->cs_data.bits.data;
474
490
            end = ipsp->cs_data.bits.data + ipsp->cs_data.bits.size;
475
491
            goto call;
476
492
        case c_return:
 
493
            if (call_depth == 0)
 
494
                return (gs_note_error(gs_error_invalidfont));
 
495
            else
 
496
                call_depth--;
477
497
            gs_glyph_data_free(&ipsp->cs_data, "gs_type1_piece_codes");
478
498
            --ipsp;
479
499
            if (ipsp < ipstack)
521
541
                default:
522
542
                    goto out;
523
543
                case 3:
524
 
                    csp -= 2;
 
544
                    if (csp >= &(cstack[1]))
 
545
                        csp -= 2;
525
546
                    goto top;
526
547
                case 12:
527
548
                case 13: