{"action":"closed","issue":{"url":"https://api.github.com/repos/knxd/knxd/issues/111","labels_url":"https://api.github.com/repos/knxd/knxd/issues/111/labels{/name}","comments_url":"https://api.github.com/repos/knxd/knxd/issues/111/comments","events_url":"https://api.github.com/repos/knxd/knxd/issues/111/events","html_url":"https://github.com/knxd/knxd/issues/111","id":123942513,"number":111,"title":"Crashes with segmentation fault if option \"-i\" is given without port parameter","user":{"login":"Sonderstorch","id":8337957,"avatar_url":"https://avatars.githubusercontent.com/u/8337957?v=3","gravatar_id":"","url":"https://api.github.com/users/Sonderstorch","html_url":"https://github.com/Sonderstorch","followers_url":"https://api.github.com/users/Sonderstorch/followers","following_url":"https://api.github.com/users/Sonderstorch/following{/other_user}","gists_url":"https://api.github.com/users/Sonderstorch/gists{/gist_id}","starred_url":"https://api.github.com/users/Sonderstorch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Sonderstorch/subscriptions","organizations_url":"https://api.github.com/users/Sonderstorch/orgs","repos_url":"https://api.github.com/users/Sonderstorch/repos","events_url":"https://api.github.com/users/Sonderstorch/events{/privacy}","received_events_url":"https://api.github.com/users/Sonderstorch/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-26T18:12:49Z","updated_at":"2015-12-26T20:36:02Z","closed_at":"2015-12-26T20:36:02Z","body":"```\r\n(gdb) run\r\nStarting program: /usr/bin/knxd -e 1.1.15 -b tpuarts:/dev/ttyAMA0 -i\r\n[Thread debugging using libthread_db enabled]\r\nUsing host libthread_db library \"/lib/arm-linux-gnueabihf/libthread_db.so.1\".\r\n\r\nProgram received signal SIGSEGV, Segmentation fault.\r\n0x0000b964 in parse_opt (key=105, arg=<optimized out>, state=0xbefff504) at knxd.cpp:374\r\n374             int port = atoi(OPT_ARG(arg,state,\"6720\"));\r\n```\r\n\r\nThere's also a typo in knxd.cpp, line 234 (\"a commonication stack\").\r\n\r\nI wanted to fix it, but seeing this crude mix between old-style C and CPP as \"C with classes\" approach I rather supress my urge to rewrite the whole thing... The command line parsing is just pathologic. Guys, use boost::program_options or at least getopt.\r\n\r\nAh, and what makes this an issue is, that the PORT parameter is described as optional (but rather isn't)."}}