Description: Uses a prefix increment operator to improve the argument parsing
  logic and reliably determine the end of the argument list. This is needed
  so that 'p.rshcmd' isn't set to NULL which would result in a segmentation
  fault if passed to xstrdup.
Author: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Forwarded: no
Last-Update: 2025-04-19
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/pexec.c
+++ b/src/pexec.c
@@ -3730,7 +3730,7 @@
 	 }
 	/* -g, --remote-shell: name (and optional arguments) for the remote shell */
 	else if ( strcmp(argv[i],"-g")==0 || strcmp(argv[i],"--remote-shell")==0 )
- 	 {	if ( (i++)>=argc )
+ 	 {	if ( (++i)>=argc )
 		 {	fprint_err_invarg1(argv[i-1]);return(1);	}
 		p.rshcmd=xstrdup(argv[i]);
 	 }
