Skip to content

Ghostscript 10.07.0#19

Open
jwaisner wants to merge 1 commit intomainfrom
april
Open

Ghostscript 10.07.0#19
jwaisner wants to merge 1 commit intomainfrom
april

Conversation

@jwaisner
Copy link
Copy Markdown
Contributor

No description provided.

@jwaisner jwaisner requested a review from N6REJ as a code owner April 12, 2026 22:50
@jwaisner jwaisner added enhancement ✨ Improve program Security 🔐 Security issue labels Apr 12, 2026
@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

Add Ghostscript 10.07.0 version support and update release properties
✨ Enhancement

Grey Divider

Walkthroughs

Description
• Add Ghostscript 10.07.0 version support with configuration files
• Update bundle release version to 2026.4.12
• Register new release in releases.properties mapping
Diagram
flowchart LR
  A["Ghostscript 10.07.0"] --> B["Configuration Files"]
  B --> C["bearsampp.conf"]
  B --> D["update_cidfmap.bat"]
  A --> E["Release Properties"]
  E --> F["releases.properties"]
  E --> G["build.properties"]
  F --> H["GitHub Release URL"]
  G --> I["Version 2026.4.12"]
Loading

Grey Divider

File Changes

1. bin/ghostscript10.07.0/update_cidfmap.bat ⚙️ Configuration changes +4/-0

Add CID font map update batch script

• New batch script for updating CID font map
• Executes gswin64c.exe with font directory and CID map configuration
• Runs mkcidfm.ps script for font mapping generation

bin/ghostscript10.07.0/update_cidfmap.bat


2. bin/ghostscript10.07.0/bearsampp.conf ⚙️ Configuration changes +5/-0

Add Ghostscript 10.07.0 configuration file

• New configuration file for Ghostscript 10.07.0
• Specifies executable paths for GUI and console versions
• Defines bundle release version placeholder

bin/ghostscript10.07.0/bearsampp.conf


3. build.properties ⚙️ Configuration changes +1/-1

Update bundle release version number

• Update bundle.release from 2026.1.15 to 2026.4.12
• Reflects new release date for Ghostscript module

build.properties


View more (1)
4. releases.properties ⚙️ Configuration changes +1/-0

Register Ghostscript 10.07.0 release mapping

• Add new entry for Ghostscript 10.07.0 release
• Maps version to GitHub release download URL with 2026.4.12 tag
• Maintains backward compatibility with previous versions

releases.properties


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review bot commented Apr 12, 2026

Code Review by Qodo

🐞 Bugs (1)   📘 Rule violations (0)   📎 Requirement gaps (0)   🖥 UI issues (0)   🎨 UX Issues (0)
🐞\ ≡ Correctness (1)

Grey Divider


Action required

1. Unquoted batch paths 🐞
Description
update_cidfmap.bat uses cd %~dp0 (no quotes, no /d) and then runs a relative
bin\gswin64c.exe; if the module lives in a path with spaces or on a different drive, cd can fail
and the script may fail or run an unintended executable. This can prevent CIDF map generation and is
risky because execution depends on the caller’s working directory.
Code

bin/ghostscript10.07.0/update_cidfmap.bat[R3-4]

+cd %~dp0
+bin\gswin64c.exe -q -dBATCH -sFONTDIR=c:/windows/fonts -sCIDFMAP=lib/cidfmap lib/mkcidfm.ps
Evidence
The script changes directory using an unquoted %~dp0 and then invokes the Ghostscript console exe
via a relative path, so correct execution depends on cd succeeding and the current working
directory being the module directory. The build explicitly packages this script into the final
bundle, so end users will run it as-shipped.

bin/ghostscript10.07.0/update_cidfmap.bat[1-4]
build.gradle[689-697]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
`bin/ghostscript10.07.0/update_cidfmap.bat` uses `cd %~dp0` (no quotes, no `/d`) and calls a relative `bin\gswin64c.exe`. This breaks when the script directory contains spaces or is on a different drive than the current working directory, and can accidentally execute the wrong binary.

### Issue Context
This script is copied into the final packaged bundle and is intended to be executed by end users to regenerate `lib/cidfmap`.

### Fix Focus Areas
- bin/ghostscript10.07.0/update_cidfmap.bat[1-4]

### Suggested change
- Use `pushd "%~dp0"` (or `cd /d "%~dp0"`) to reliably change drive + directory.
- Quote the executable path (e.g., `"%~dp0bin\gswin64c.exe" ...`) and consider guarding with `if not exist` plus `exit /b 1`.
- Optionally `popd` at the end and propagate `%ERRORLEVEL%`.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

Comment on lines +3 to +4
cd %~dp0
bin\gswin64c.exe -q -dBATCH -sFONTDIR=c:/windows/fonts -sCIDFMAP=lib/cidfmap lib/mkcidfm.ps
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. Unquoted batch paths 🐞 Bug ≡ Correctness

update_cidfmap.bat uses cd %~dp0 (no quotes, no /d) and then runs a relative
bin\gswin64c.exe; if the module lives in a path with spaces or on a different drive, cd can fail
and the script may fail or run an unintended executable. This can prevent CIDF map generation and is
risky because execution depends on the caller’s working directory.
Agent Prompt
### Issue description
`bin/ghostscript10.07.0/update_cidfmap.bat` uses `cd %~dp0` (no quotes, no `/d`) and calls a relative `bin\gswin64c.exe`. This breaks when the script directory contains spaces or is on a different drive than the current working directory, and can accidentally execute the wrong binary.

### Issue Context
This script is copied into the final packaged bundle and is intended to be executed by end users to regenerate `lib/cidfmap`.

### Fix Focus Areas
- bin/ghostscript10.07.0/update_cidfmap.bat[1-4]

### Suggested change
- Use `pushd "%~dp0"` (or `cd /d "%~dp0"`) to reliably change drive + directory.
- Quote the executable path (e.g., `"%~dp0bin\gswin64c.exe" ...`) and consider guarding with `if not exist` plus `exit /b 1`.
- Optionally `popd` at the end and propagate `%ERRORLEVEL%`.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement ✨ Improve program Security 🔐 Security issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant