{"action":"created","issue":{"url":"https://api.github.com/repos/grimfang4/SDL_FontCache/issues/7","repository_url":"https://api.github.com/repos/grimfang4/SDL_FontCache","labels_url":"https://api.github.com/repos/grimfang4/SDL_FontCache/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/grimfang4/SDL_FontCache/issues/7/comments","events_url":"https://api.github.com/repos/grimfang4/SDL_FontCache/issues/7/events","html_url":"https://github.com/grimfang4/SDL_FontCache/pull/7","id":143506288,"number":7,"title":"Fixed a null check to check null before using the value. ","user":{"login":"sago007","id":2415098,"avatar_url":"https://avatars.githubusercontent.com/u/2415098?v=3","gravatar_id":"","url":"https://api.github.com/users/sago007","html_url":"https://github.com/sago007","followers_url":"https://api.github.com/users/sago007/followers","following_url":"https://api.github.com/users/sago007/following{/other_user}","gists_url":"https://api.github.com/users/sago007/gists{/gist_id}","starred_url":"https://api.github.com/users/sago007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sago007/subscriptions","organizations_url":"https://api.github.com/users/sago007/orgs","repos_url":"https://api.github.com/users/sago007/repos","events_url":"https://api.github.com/users/sago007/events{/privacy}","received_events_url":"https://api.github.com/users/sago007/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-25T14:05:04Z","updated_at":"2016-03-25T16:51:16Z","closed_at":"2016-03-25T14:13:20Z","pull_request":{"url":"https://api.github.com/repos/grimfang4/SDL_FontCache/pulls/7","html_url":"https://github.com/grimfang4/SDL_FontCache/pull/7","diff_url":"https://github.com/grimfang4/SDL_FontCache/pull/7.diff","patch_url":"https://github.com/grimfang4/SDL_FontCache/pull/7.patch"},"body":"Previous code would have caused undefined behaviour if called with 0. On AIX and Windows 95 it would have been fine. On Linux and more modern versions of Windows it would crash. \r\n\r\nI have kept the style of having all variables in the start (C89-style) even if the code does not actually compile in C89-mode.\r\n\r\nDiscovered by Coverity."},"comment":{"url":"https://api.github.com/repos/grimfang4/SDL_FontCache/issues/comments/201360520","html_url":"https://github.com/grimfang4/SDL_FontCache/pull/7#issuecomment-201360520","issue_url":"https://api.github.com/repos/grimfang4/SDL_FontCache/issues/7","id":201360520,"user":{"login":"sago007","id":2415098,"avatar_url":"https://avatars.githubusercontent.com/u/2415098?v=3","gravatar_id":"","url":"https://api.github.com/users/sago007","html_url":"https://github.com/sago007","followers_url":"https://api.github.com/users/sago007/followers","following_url":"https://api.github.com/users/sago007/following{/other_user}","gists_url":"https://api.github.com/users/sago007/gists{/gist_id}","starred_url":"https://api.github.com/users/sago007/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sago007/subscriptions","organizations_url":"https://api.github.com/users/sago007/orgs","repos_url":"https://api.github.com/users/sago007/repos","events_url":"https://api.github.com/users/sago007/events{/privacy}","received_events_url":"https://api.github.com/users/sago007/received_events","type":"User","site_admin":false},"created_at":"2016-03-25T16:51:16Z","updated_at":"2016-03-25T16:51:16Z","body":"Yes, strlen cannot accept null. It is the programmers responsibility to check it. \r\nI worked 5 and half years at a company where the difference between how AIX and Linux handles NULL caused several crashes in production systems. "}}