Project

General

Profile

Actions

Bug #5736

closed

Fix missing quotes for possibly unresolved variables in shell test-statements

Added by arehbein over 1 year ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Low
Assignee:
arehbein
Target version:
-
Start date:
11/01/2022
Due date:
% Done:

100%

Spec Reference:
Tags:

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.

Actions #1

Updated by arehbein over 1 year ago

  • Status changed from New to Resolved
  • % Done changed from 90 to 100
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)