{"action":"closed","issue":{"url":"https://api.github.com/repos/OpenSC/libp11/issues/199","repository_url":"https://api.github.com/repos/OpenSC/libp11","labels_url":"https://api.github.com/repos/OpenSC/libp11/issues/199/labels{/name}","comments_url":"https://api.github.com/repos/OpenSC/libp11/issues/199/comments","events_url":"https://api.github.com/repos/OpenSC/libp11/issues/199/events","html_url":"https://github.com/OpenSC/libp11/issues/199","id":286849279,"number":199,"title":"Example/listkeys.c Segmentation fault","user":{"login":"CrawlGit","id":35235533,"avatar_url":"https://avatars3.githubusercontent.com/u/35235533?v=4","gravatar_id":"","url":"https://api.github.com/users/CrawlGit","html_url":"https://github.com/CrawlGit","followers_url":"https://api.github.com/users/CrawlGit/followers","following_url":"https://api.github.com/users/CrawlGit/following{/other_user}","gists_url":"https://api.github.com/users/CrawlGit/gists{/gist_id}","starred_url":"https://api.github.com/users/CrawlGit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CrawlGit/subscriptions","organizations_url":"https://api.github.com/users/CrawlGit/orgs","repos_url":"https://api.github.com/users/CrawlGit/repos","events_url":"https://api.github.com/users/CrawlGit/events{/privacy}","received_events_url":"https://api.github.com/users/CrawlGit/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-01-08T18:56:11Z","updated_at":"2018-02-03T12:28:40Z","closed_at":"2018-02-03T12:28:40Z","author_association":"NONE","body":"Hi everyone,\r\n\r\nThis is more of a minor inconvenience than an actual problem since it is only an example file. But calling listkeys the following way:\r\n\r\n*./listkeys PATH/TO/ something AAAAAAAAAAAAAAAAAAAAA*\r\n\r\n(21*A) causes a buffer overflow in strcpy(password, argv[2]) since the password buffer is only 20 bytes.\r\n\r\nA fix to this issue would be: \r\n\r\nchar *password = malloc(sizeof(argv[2]+1)\r\n\r\nOn related notes, calling listkeys with an incorrect path also returns a segmentation fault which I could not explain. \r\n\r\nRegards,\r\nGitCrawl\r\n\r\n"}}
{"actor":{"display_login":"mtrojnar"}}