numam-dpdk/app
Ophir Munk 06ca0e4baa app/regex: fix crash in options parsing
getopt_long() parses command-line arguments. One of its arguments
'longopts' is a pointer to the first element of an array of struct
option.  The last element of the array has to be filled with zeros
to mark the end of options. For example:

struct option longopts[] = {
{ "help",  0, 0, ARG_HELP},
....
/* End of options */
{ 0, 0, 0, 0 }
};

This commit adds the last element. Prior to this commit getopt_long()
continued parsing beyond the longopts[] array which occasionally caused
segmentation faults.

Fixes: de06137cb2 ("app/regex: add RegEx test application")
Cc: stable@dpdk.org

Signed-off-by: Ophir Munk <ophirmu@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
Acked-by: Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
2020-10-20 00:05:54 +02:00
..
pdump build: remove makefiles 2020-09-08 00:09:50 +02:00
proc-info build: replace use of old build macros 2020-10-19 22:15:44 +02:00
test build: replace use of old build macros 2020-10-19 22:15:44 +02:00
test-acl acl: add 512-bit AVX512 classify method 2020-10-14 14:23:01 +02:00
test-bbdev build: replace use of old build macros 2020-10-19 22:15:44 +02:00
test-cmdline cmdline: make implementation logically opaque 2020-10-15 00:39:10 +02:00
test-compress-perf build: remove makefiles 2020-09-08 00:09:50 +02:00
test-crypto-perf build: replace use of old build macros 2020-10-19 22:15:44 +02:00
test-eventdev eventdev: express DLB/DLB2 PMD constraints 2020-10-15 23:16:07 +02:00
test-fib build: remove makefiles 2020-09-08 00:09:50 +02:00
test-flow-perf app/flow-perf: check stop call status 2020-10-16 22:26:41 +02:00
test-pipeline build: replace use of old build macros 2020-10-19 22:15:44 +02:00
test-pmd build: replace use of old build macros 2020-10-19 22:15:44 +02:00
test-regex app/regex: fix crash in options parsing 2020-10-20 00:05:54 +02:00
test-sad app/test-sad: fix uninitialized variable 2020-10-14 21:06:56 +02:00
meson.build app/regex: add RegEx test application 2020-07-30 09:13:52 +02:00