Don't crash on un-wordexp()'able arguments!

We run shell expansion on configuration arguments,
e.g. `printcommand`, but it would crash if the config
file's input was not quoted, e.g.

  printcommand=pstopdf - - > $HOME/print.pdf

Now echo'ing an error to stderr and moving on.
Be sure to quote, e.g.

  printcommand="pstopdf - - > $HOME/print.pdf"
This commit is contained in:
Bill Kendrick 2023-06-03 14:10:13 -07:00
parent 0e359a1fba
commit fe33acc716
2 changed files with 20 additions and 3 deletions

View file

@ -94,6 +94,12 @@ https://tuxpaint.org/
data beyond the end of the data (copied from the original PNG).
Bill Kendrick <bill@newbreedsoftware.com>
* Shell expansion (via wordexp()) of configuration options containing
spaces (e.g., `printcommand=ps2pdf - - > $HOME/print.pdf`) would
fail & cause a crash. It now shows an error and recommends adding
quotes. (e.g., `printcommand="ps2pdf - - > $HOME/print.pdf"`)
Bill Kendrick <bill@newbreedsoftware.com>
* Localization Updates:
---------------------
* Russian translaton