projects
/
tools
/
apitrace.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e8871ac
)
Fix crash when using apitrace trim's -o option.
author
Kenneth Graunke
<kenneth@whitecape.org>
Thu, 5 Apr 2012 17:51:26 +0000
(10:51 -0700)
committer
José Fonseca
<jose.r.fonseca@gmail.com>
Thu, 5 Apr 2012 19:01:41 +0000
(20:01 +0100)
The -o option takes an argument (the filename), so the getopt string
needs to be 'o:', not 'o'. Otherwise, no argument is parsed, optarg
remains NULL, and we crash on "output = optarg".
cli/cli_trim.cpp
patch
|
blob
|
history
diff --git
a/cli/cli_trim.cpp
b/cli/cli_trim.cpp
index
2ea5251
..
206e24e
100644
(file)
--- a/
cli/cli_trim.cpp
+++ b/
cli/cli_trim.cpp
@@
-58,7
+58,7
@@
enum {
};
const static char *
-shortOptions = "ho";
+shortOptions = "ho
:
";
const static struct option
longOptions[] = {