-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: add a common function to parse and create iio_contexts
Some (older) implementations of getopt_long) do not protect against internal buffer overflows, so copy argv to a temp str array, and parse most in a common function. (-u -h -x -n, and -S). -h, --help Show this help and quit. -x, --xml Use the XML backend with the provided XML file. -u, --uri Use the context at the provided URI. -S, --scan Scan for available backends. -a, --auto Scan for available contexts and if only one is available use it. The "default" for scan is "S", since "s" is used for many apps as sample size. This means that iio_info now takes -s and -S as scan. This also fixes both CWE-120 and CWE-20 https://cwe.mitre.org/data/definitions/120.html https://cwe.mitre.org/data/definitions/20.html and almost is a net decrease (348 insertions, 345 deletions over 9 files). Signed-off-by: Robin Getz <[email protected]>
- Loading branch information
Showing
9 changed files
with
348 additions
and
345 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.