Bug 419 - usertools/dpdk-setup.sh crashes on non-alphanumeric input
Summary: usertools/dpdk-setup.sh crashes on non-alphanumeric input
Status: UNCONFIRMED
Alias: None
Product: DPDK
Classification: Unclassified
Component: other (show other bugs)
Version: 20.11
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Thomas Monjalon
URL:
Depends on:
Blocks:
 
Reported: 2020-03-16 08:05 CET by Sarosh Arif
Modified: 2020-03-20 19:12 CET (History)
1 user (show)



Attachments

Description Sarosh Arif 2020-03-16 08:05:44 CET
While using usertools/dpdk-setup.sh if the user enters any non-alphanumeric character, by mistake perhaps, instead of giving an error and allowing user to re-enter his choice, the dpdk-setup script crashes giving the following message:

./dpdk-setup.sh: line 598: >: syntax error: operand expected (error token is ">")

A possible solution can be to put a conditional statement before the execution of line 598 which is:
${OPTIONS[our_entry]} ${our_entry}
To make sure this statement is only executed when the input is correct.

This error can be replicated easily by following these steps:
1. Enter these commands on the terminal
cd dpdk/usertools
./dpdk-setup.sh
2. When prompted, enter any non-alphanumeric character such as ">"
Comment 1 Ajit Khaparde 2020-03-20 19:12:42 CET
Thomas, Do you think this can be done? Thanks

Note You need to log in before you can comment on or make changes to this bug.