{"action":"created","issue":{"url":"https://api.github.com/repos/cleanflight/cleanflight/issues/1494","labels_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/1494/labels{/name}","comments_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/1494/comments","events_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/1494/events","html_url":"https://github.com/cleanflight/cleanflight/pull/1494","id":117008701,"number":1494,"title":"fix for LED strip initialization invalid memory write","user":{"login":"DreamNik","id":1586959,"avatar_url":"https://avatars.githubusercontent.com/u/1586959?v=3","gravatar_id":"","url":"https://api.github.com/users/DreamNik","html_url":"https://github.com/DreamNik","followers_url":"https://api.github.com/users/DreamNik/followers","following_url":"https://api.github.com/users/DreamNik/following{/other_user}","gists_url":"https://api.github.com/users/DreamNik/gists{/gist_id}","starred_url":"https://api.github.com/users/DreamNik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DreamNik/subscriptions","organizations_url":"https://api.github.com/users/DreamNik/orgs","repos_url":"https://api.github.com/users/DreamNik/repos","events_url":"https://api.github.com/users/DreamNik/events{/privacy}","received_events_url":"https://api.github.com/users/DreamNik/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-15T18:08:36Z","updated_at":"2015-11-28T13:33:06Z","closed_at":"2015-11-28T13:32:55Z","pull_request":{"url":"https://api.github.com/repos/cleanflight/cleanflight/pulls/1494","html_url":"https://github.com/cleanflight/cleanflight/pull/1494","diff_url":"https://github.com/cleanflight/cleanflight/pull/1494.diff","patch_url":"https://github.com/cleanflight/cleanflight/pull/1494.patch"},"body":"I've noticed that function \"updateLedCount\" can be executed when global variable \"ledConfigs\" is zero, which results writing to memory at 0x0.\r\nThe call stack when this happens is:\r\n\r\n0 updateLedCount ledstrip.c 389\r\n1 reevalulateLedConfig ledstrip.c 403\r\n2 applyDefaultLedStripConfig ledstrip.c 1031\r\n3 resetConf config.c 545\r\n4 resetEEPROM config.c 992\r\n5 ensureEEPROMContainsValidData config.c 987\r\n6 init main.c 154\r\n7 main main.c 528\r\n\r\nLooks like the function \"applyDefaultLedStripConfig\" reevaluates global LED config before it's initialized.\r\n\r\n(Sorry for duplicate issue. Someone (me) didn't read docs about separate branch for pull requests)"},"comment":{"url":"https://api.github.com/repos/cleanflight/cleanflight/issues/comments/160296241","html_url":"https://github.com/cleanflight/cleanflight/pull/1494#issuecomment-160296241","issue_url":"https://api.github.com/repos/cleanflight/cleanflight/issues/1494","id":160296241,"user":{"login":"hydra","id":57075,"avatar_url":"https://avatars.githubusercontent.com/u/57075?v=3","gravatar_id":"","url":"https://api.github.com/users/hydra","html_url":"https://github.com/hydra","followers_url":"https://api.github.com/users/hydra/followers","following_url":"https://api.github.com/users/hydra/following{/other_user}","gists_url":"https://api.github.com/users/hydra/gists{/gist_id}","starred_url":"https://api.github.com/users/hydra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hydra/subscriptions","organizations_url":"https://api.github.com/users/hydra/orgs","repos_url":"https://api.github.com/users/hydra/repos","events_url":"https://api.github.com/users/hydra/events{/privacy}","received_events_url":"https://api.github.com/users/hydra/received_events","type":"User","site_admin":false},"created_at":"2015-11-28T13:33:06Z","updated_at":"2015-11-28T13:33:06Z","body":"good catch, thanks for the fix"}}