Page MenuHome GnuPG

GPG misparses `--list-options=show-sig-subpackets="100"a`
Closed, WontfixPublic

Description

GPG misparses --list-options=show-sig-subpackets="100"a. This should be considered an error.

Details

Version
2.3.4

Event Timeline

DemiMarie created this object in space S1 Public.
DemiMarie created this object with edit policy "Custom Policy".

Please explain what you mean by this. Which GnuPG version, which OS, which shell, what is the problem.

My guess is that you mean a value of "100a" should exhibit an error and not ignore the "a". RIght this is a small error but nothing to worry about. atoi(3) ist used here.

I am using GnuPG 2.3.4 on Fedora Linux. I am referring to --list-options=show-sig-subpackets="100"a (note the quotes). The bug is that the character after the trailing close quote is ignored, rather than being treated as an invalid option and causing an error. That is, I would expect show-sig-subpackets="100"a to be parsed as show-sig-subpackets="100",a or be an error.

werner claimed this task.
werner triaged this task as Low priority.

The quotes are irrelevant because they are evaluated by the shell and don't make a difference here. A Unix shell is different than Windows cmd.exe.

This is a too minor bug and common for Unix tools.

For clarification, the strings I have provided are raw argv elements as would be passed to execve(), with quoting already removed.

The quotes are irrelevant because they are evaluated by the shell and don't make a difference here.

This is incorrect. The following shell script reproduces the bug:

#!/bin/sh --
/usr/bin/gpg2 --list-options 'show-sig-subpackets="100"a' /dev/null

FWIW, on Unix is common to describe options as given on the standard shell.

Reopening as it appears this issue was closed based on an incorrect understanding of what it is.

DemiMarie raised the priority of this task from Low to Needs Triage.Jun 16 2022, 6:52 PM
DemiMarie edited projects, added Bug Report, g10; removed gnupg.

Please don't play ping pong now,