Commit 7730b13e authored by Alexis La Goutte's avatar Alexis La Goutte Committed by Tatsuhiro Tsujikawa

Fix Address of stack memory associated with local variable 'flag' is still

referred to by the global variable 'long_options' upon returning to the caller.
This will be a dangling reference

Found by Clang Analyzer
parent ed533995
......@@ -638,7 +638,7 @@ Options:
int main(int argc, char **argv)
{
while(1) {
int flag = 0;
static int flag = 0;
static option long_options[] = {
{"requests", required_argument, nullptr, 'n'},
{"clients", required_argument, nullptr, 'c'},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment