Skip to content

Commits on Apr 4, 2023

Commits on Mar 15, 2021

Commits on Jul 24, 2020

  1. Bug 702582, CVE 2020-15900 Memory Corruption in Ghostscript 9.52

    Fix the 'rsearch' calculation for the 'post' size to give the correct
    size.  Previous calculation would result in a size that was too large,
    and could underflow to max uint32_t. Also fix 'rsearch' to return the
    correct 'pre' string with empty string match.
    
    A future change may 'undefine' this undocumented, non-standard operator
    during initialization as we do with the many other non-standard internal
    PostScript operators and procedures.
    Ray Johnston committed Jul 24, 2020

Commits on Apr 10, 2020

Commits on May 29, 2019

  1. Add use of new file access permissions to PS interp

    (this is a squash of several commits from filesec branch)
    
    Use errno to indicate invalidfileaccess
    
    Integrate fontconfig with file access controls
    
    fontconfig API has a call to retrieve all the directories about which fontconfig
    knows, so we can get those, and add them to the paths from which we're permitted
    to read.
    
    Add (most of) the Postscript "managed" paths....
    
    ...to the access controls.
    
    GenericResourceDir, ICCProfilesDir (reading) and temporary file directories for
    read/write/control.
    
    Add paths/files from C to the file access controls
    
    The -I paths, environment variables and build time paths.
    
    The command line specified output file, permit writing.
    
    Lastly, the command line specified input file is added to the readable list,
    interpreted, and then removed from the list.
    
    Add the FONTPATH path list to permit read access control list.
    
    I opted to do this in Postscript because the list is (normally) a colon
    separated list of paths, which we split into an array of paths (in Postscript) -
    it seems sensible to do this only once, both for storage and permissions.
    
    Add a non-standard string 'reverse search" operator
    
    The search operator searches for the first occurrence of a character code in a
    string (i.e. searches forwards from the start of the string), 'rsearch' finds
    the last instance of a character code (i.e. search backwards from the end of
    the string).
    
    Fix gp_open_scratch_file_rm for access permissions
    
    i.e. the same as gp_open_scratch_file
    
    Handle clist file 'rewind' failures
    
    'Rewinding' clist files may involved closing and recreating the temporary files,
    which conceivably can fail, but the clist procs rewind method was a void
    function, so couldn't return an error.
    
    It now can, and does return an error, and we handle the error.
    
    Add file permissions support for piped output.
    
    Paths from Fontmap to PermitReading list
    
    cidfmap paths, add to PermitReading list
    
    Add command line options for path access control addition
    
    --permit-file-read
    --permit-file-write
    --permit-file-control
    --permit-file-all
    
    They all take a separated list of paths (the usual platform specific ':' or ';'
    separator), and to the respective access control lists - the final 'all' option
    adds the paths to all the control lists.
    
    Add file access control to the 'gp_stat' method.
    
    This is complicated by the need to add the memory allocator context to the
    gp_stat parameters. To facilitate this, I've added a gs_memory_t pointer to the
    gx_io_device structure, which is set during the io device initialisation at
    startup.
    
    mkromfs: Add dummy gp_stat_impl for Windows - saves quite a bit of pointless
    build upheaval
    
    Add file access protection to file enumeration.
    
    The low level implementation of Postscript's filenameforall (*_enumerate_files)
    needs to also honour file access protection.
    
    This is has been complicated by requiring a gs_memory_t to be available where
    it wasn't previously (in order to access the gs_lib_ctx and the file permissions
    lists therein).
    
    Temp
    chris-liddell committed May 29, 2019

Commits on Jan 30, 2018

  1. Update copyright notice with new head office address.

    Also update copyright dates.
    
    Remove gs_cmdl.ps as we no longer use it, and remove its entry from
    psfiles.htm.
    
    Remove xfonts.htm as this feature (xfont support) is long, long gone.
    Ken Sharp committed Jan 30, 2018

Commits on Jul 20, 2015

  1. Commit of build_consolidation branch

    Squashed into one commit (see branch for details of the evolution of the
    branch).
    
    This brings gpcl6 and gxps into the Ghostscript build system, and a shared
    set of graphics library object files for all the interpreters.
    
    Also, brings the same configuration options to the pcl and xps products as we
    have for Ghostscript.
    chris-liddell committed Jul 20, 2015