Actions
Bug #5736
closedFix missing quotes for possibly unresolved variables in shell test-statements
Status:
Resolved
Priority:
Low
Assignee:
arehbein
Target version:
-
Start date:
11/01/2022
Due date:
% Done:
100%
Spec Reference:
Description
osmo-ttcn3-hacks/ttcn3-dumpcap-start.sh
and osmo-ttcn3-hacks/ttcn3-tcpdump-start.sh
both contain variable resolutions without quotes inside shell-test statements, here is an example from the latter:
if [ -x $DUMPCAP ]; then
If the variable is empty, the shell (also tried this with dash
) will evaluate the test statement as true and we get misleading error logs in the latter case. Either way, it's most likely not what was intended. Putting quotes around the expression for variable resolution (i.e. putting "$DUMPCAP"
instead) fixes this.
Updated by arehbein over 1 year ago
- Status changed from New to Resolved
- % Done changed from 90 to 100
Actions