{"action":"created","comment":{"url":"https://api.github.com/repos/OpenMotorDrive/framework/pulls/comments/150617773","pull_request_review_id":76193558,"id":150617773,"diff_hunk":"@@ -0,0 +1,47 @@\n+#include \"uavcan_debug.h\"\n+#include <modules/uavcan/uavcan.h>\n+#include <stdio.h>\n+#include <stdarg.h>\n+#include <string.h>\n+#include <chprintf.h>\n+#include <memstreams.h>\n+void uavcan_send_debug_msg(uint8_t debug_level, char* source, const char *fmt, ...)\n+{\n+    struct uavcan_protocol_debug_LogMessage_s log_msg;\n+\n+    va_list ap;\n+    MemoryStream ms;\n+    BaseSequentialStream *chp;\n+\n+    /* Memory stream object to be used as a string writer, reserving one\n+     byte for the final zero.*/\n+    msObjectInit(&ms, (uint8_t *)log_msg.text, sizeof(log_msg.text), 0);\n+\n+    /* Performing the print operation using the common code.*/\n+    chp = (BaseSequentialStream *)(void *)&ms;\n+    va_start(ap, fmt);\n+    log_msg.text_len = chvprintf(chp, fmt, ap);\n+    va_end(ap);\n+\n+    /* Terminate with a zero, unless size==0.*/\n+    if (ms.eos < sizeof(log_msg.text))\n+      log_msg.text[ms.eos] = 0;\n+\n+\n+    log_msg.source_len = strlen(source);","path":"modules/uavcan_debug/uavcan_debug.c","position":31,"original_position":31,"commit_id":"c95feb89fb2c09ab3aaa4aedaaaa75e407e6b8c3","original_commit_id":"c95feb89fb2c09ab3aaa4aedaaaa75e407e6b8c3","user":{"login":"jschall","id":1015761,"avatar_url":"https://avatars3.githubusercontent.com/u/1015761?v=4","gravatar_id":"","url":"https://api.github.com/users/jschall","html_url":"https://github.com/jschall","followers_url":"https://api.github.com/users/jschall/followers","following_url":"https://api.github.com/users/jschall/following{/other_user}","gists_url":"https://api.github.com/users/jschall/gists{/gist_id}","starred_url":"https://api.github.com/users/jschall/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jschall/subscriptions","organizations_url":"https://api.github.com/users/jschall/orgs","repos_url":"https://api.github.com/users/jschall/repos","events_url":"https://api.github.com/users/jschall/events{/privacy}","received_events_url":"https://api.github.com/users/jschall/received_events","type":"User","site_admin":false},"body":"This needs to be protected from overflow with strnlen(source, sizeof(log_msg.source))","created_at":"2017-11-13T18:01:42Z","updated_at":"2017-11-13T18:13:07Z","html_url":"https://github.com/OpenMotorDrive/framework/pull/1#discussion_r150617773","pull_request_url":"https://api.github.com/repos/OpenMotorDrive/framework/pulls/1","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/OpenMotorDrive/framework/pulls/comments/150617773"},"html":{"href":"https://github.com/OpenMotorDrive/framework/pull/1#discussion_r150617773"},"pull_request":{"href":"https://api.github.com/repos/OpenMotorDrive/framework/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/OpenMotorDrive/framework/pulls/1","id":152099130,"html_url":"https://github.com/OpenMotorDrive/framework/pull/1","diff_url":"https://github.com/OpenMotorDrive/framework/pull/1.diff","patch_url":"https://github.com/OpenMotorDrive/framework/pull/1.patch","issue_url":"https://api.github.com/repos/OpenMotorDrive/framework/issues/1","number":1,"state":"open","locked":false,"title":"Pr framework changes","user":{"login":"bugobliterator","id":5697288,"avatar_url":"https://avatars1.githubusercontent.com/u/5697288?v=4","gravatar_id":"","url":"https://api.github.com/users/bugobliterator","html_url":"https://github.com/bugobliterator","followers_url":"https://api.github.com/users/bugobliterator/followers","following_url":"https://api.github.com/users/bugobliterator/following{/other_user}","gists_url":"https://api.github.com/users/bugobliterator/gists{/gist_id}","starred_url":"https://api.github.com/users/bugobliterator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bugobliterator/subscriptions","organizations_url":"https://api.github.com/users/bugobliterator/orgs","repos_url":"https://api.github.com/users/bugobliterator/repos","events_url":"https://api.github.com/users/bugobliterator/events{/privacy}","received_events_url":"https://api.github.com/users/bugobliterator/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-11-12T10:59:58Z","updated_at":"2017-11-13T18:13:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7b890928ae0abcb0ee5b3a818845065ca77d8200","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/OpenMotorDrive/framework/pulls/1/commits","review_comments_url":"https://api.github.com/repos/OpenMotorDrive/framework/pulls/1/comments","review_comment_url":"https://api.github.com/repos/OpenMotorDrive/framework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenMotorDrive/framework/issues/1/comments","statuses_url":"https://api.github.com/repos/OpenMotorDrive/framework/statuses/c95feb89fb2c09ab3aaa4aedaaaa75e407e6b8c3","head":{"label":"bugobliterator:pr-framework-changes","ref":"pr-framework-changes","sha":"c95feb89fb2c09ab3aaa4aedaaaa75e407e6b8c3","user":{"login":"bugobliterator","id":5697288,"avatar_url":"https://avatars1.githubusercontent.com/u/5697288?v=4","gravatar_id":"","url":"https://api.github.com/users/bugobliterator","html_url":"https://github.com/bugobliterator","followers_url":"https://api.github.com/users/bugobliterator/followers","following_url":"https://api.github.com/users/bugobliterator/following{/other_user}","gists_url":"https://api.github.com/users/bugobliterator/gists{/gist_id}","starred_url":"https://api.github.com/users/bugobliterator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bugobliterator/subscriptions","organizations_url":"https://api.github.com/users/bugobliterator/orgs","repos_url":"https://api.github.com/users/bugobliterator/repos","events_url":"https://api.github.com/users/bugobliterator/events{/privacy}","received_events_url":"https://api.github.com/users/bugobliterator/received_events","type":"User","site_admin":false},"repo":{"id":110424981,"name":"framework","full_name":"bugobliterator/framework","owner":{"login":"bugobliterator","id":5697288,"avatar_url":"https://avatars1.githubusercontent.com/u/5697288?v=4","gravatar_id":"","url":"https://api.github.com/users/bugobliterator","html_url":"https://github.com/bugobliterator","followers_url":"https://api.github.com/users/bugobliterator/followers","following_url":"https://api.github.com/users/bugobliterator/following{/other_user}","gists_url":"https://api.github.com/users/bugobliterator/gists{/gist_id}","starred_url":"https://api.github.com/users/bugobliterator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bugobliterator/subscriptions","organizations_url":"https://api.github.com/users/bugobliterator/orgs","repos_url":"https://api.github.com/users/bugobliterator/repos","events_url":"https://api.github.com/users/bugobliterator/events{/privacy}","received_events_url":"https://api.github.com/users/bugobliterator/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bugobliterator/framework","description":null,"fork":true,"url":"https://api.github.com/repos/bugobliterator/framework","forks_url":"https://api.github.com/repos/bugobliterator/framework/forks","keys_url":"https://api.github.com/repos/bugobliterator/framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bugobliterator/framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bugobliterator/framework/teams","hooks_url":"https://api.github.com/repos/bugobliterator/framework/hooks","issue_events_url":"https://api.github.com/repos/bugobliterator/framework/issues/events{/number}","events_url":"https://api.github.com/repos/bugobliterator/framework/events","assignees_url":"https://api.github.com/repos/bugobliterator/framework/assignees{/user}","branches_url":"https://api.github.com/repos/bugobliterator/framework/branches{/branch}","tags_url":"https://api.github.com/repos/bugobliterator/framework/tags","blobs_url":"https://api.github.com/repos/bugobliterator/framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bugobliterator/framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bugobliterator/framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/bugobliterator/framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bugobliterator/framework/statuses/{sha}","languages_url":"https://api.github.com/repos/bugobliterator/framework/languages","stargazers_url":"https://api.github.com/repos/bugobliterator/framework/stargazers","contributors_url":"https://api.github.com/repos/bugobliterator/framework/contributors","subscribers_url":"https://api.github.com/repos/bugobliterator/framework/subscribers","subscription_url":"https://api.github.com/repos/bugobliterator/framework/subscription","commits_url":"https://api.github.com/repos/bugobliterator/framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/bugobliterator/framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/bugobliterator/framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/bugobliterator/framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/bugobliterator/framework/contents/{+path}","compare_url":"https://api.github.com/repos/bugobliterator/framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bugobliterator/framework/merges","archive_url":"https://api.github.com/repos/bugobliterator/framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bugobliterator/framework/downloads","issues_url":"https://api.github.com/repos/bugobliterator/framework/issues{/number}","pulls_url":"https://api.github.com/repos/bugobliterator/framework/pulls{/number}","milestones_url":"https://api.github.com/repos/bugobliterator/framework/milestones{/number}","notifications_url":"https://api.github.com/repos/bugobliterator/framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bugobliterator/framework/labels{/name}","releases_url":"https://api.github.com/repos/bugobliterator/framework/releases{/id}","deployments_url":"https://api.github.com/repos/bugobliterator/framework/deployments","created_at":"2017-11-12T10:57:00Z","updated_at":"2017-11-12T10:57:03Z","pushed_at":"2017-11-12T10:59:02Z","git_url":"git://github.com/bugobliterator/framework.git","ssh_url":"git@github.com:bugobliterator/framework.git","clone_url":"https://github.com/bugobliterator/framework.git","svn_url":"https://github.com/bugobliterator/framework","homepage":null,"size":9121,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"OpenMotorDrive:master","ref":"master","sha":"1b5b6ae0ed1415f1a08514460a45c04575da6560","user":{"login":"OpenMotorDrive","id":29218694,"avatar_url":"https://avatars3.githubusercontent.com/u/29218694?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenMotorDrive","html_url":"https://github.com/OpenMotorDrive","followers_url":"https://api.github.com/users/OpenMotorDrive/followers","following_url":"https://api.github.com/users/OpenMotorDrive/following{/other_user}","gists_url":"https://api.github.com/users/OpenMotorDrive/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenMotorDrive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenMotorDrive/subscriptions","organizations_url":"https://api.github.com/users/OpenMotorDrive/orgs","repos_url":"https://api.github.com/users/OpenMotorDrive/repos","events_url":"https://api.github.com/users/OpenMotorDrive/events{/privacy}","received_events_url":"https://api.github.com/users/OpenMotorDrive/received_events","type":"Organization","site_admin":false},"repo":{"id":110178580,"name":"framework","full_name":"OpenMotorDrive/framework","owner":{"login":"OpenMotorDrive","id":29218694,"avatar_url":"https://avatars3.githubusercontent.com/u/29218694?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenMotorDrive","html_url":"https://github.com/OpenMotorDrive","followers_url":"https://api.github.com/users/OpenMotorDrive/followers","following_url":"https://api.github.com/users/OpenMotorDrive/following{/other_user}","gists_url":"https://api.github.com/users/OpenMotorDrive/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenMotorDrive/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenMotorDrive/subscriptions","organizations_url":"https://api.github.com/users/OpenMotorDrive/orgs","repos_url":"https://api.github.com/users/OpenMotorDrive/repos","events_url":"https://api.github.com/users/OpenMotorDrive/events{/privacy}","received_events_url":"https://api.github.com/users/OpenMotorDrive/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OpenMotorDrive/framework","description":null,"fork":false,"url":"https://api.github.com/repos/OpenMotorDrive/framework","forks_url":"https://api.github.com/repos/OpenMotorDrive/framework/forks","keys_url":"https://api.github.com/repos/OpenMotorDrive/framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenMotorDrive/framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenMotorDrive/framework/teams","hooks_url":"https://api.github.com/repos/OpenMotorDrive/framework/hooks","issue_events_url":"https://api.github.com/repos/OpenMotorDrive/framework/issues/events{/number}","events_url":"https://api.github.com/repos/OpenMotorDrive/framework/events","assignees_url":"https://api.github.com/repos/OpenMotorDrive/framework/assignees{/user}","branches_url":"https://api.github.com/repos/OpenMotorDrive/framework/branches{/branch}","tags_url":"https://api.github.com/repos/OpenMotorDrive/framework/tags","blobs_url":"https://api.github.com/repos/OpenMotorDrive/framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenMotorDrive/framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenMotorDrive/framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenMotorDrive/framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenMotorDrive/framework/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenMotorDrive/framework/languages","stargazers_url":"https://api.github.com/repos/OpenMotorDrive/framework/stargazers","contributors_url":"https://api.github.com/repos/OpenMotorDrive/framework/contributors","subscribers_url":"https://api.github.com/repos/OpenMotorDrive/framework/subscribers","subscription_url":"https://api.github.com/repos/OpenMotorDrive/framework/subscription","commits_url":"https://api.github.com/repos/OpenMotorDrive/framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenMotorDrive/framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenMotorDrive/framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenMotorDrive/framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenMotorDrive/framework/contents/{+path}","compare_url":"https://api.github.com/repos/OpenMotorDrive/framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenMotorDrive/framework/merges","archive_url":"https://api.github.com/repos/OpenMotorDrive/framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenMotorDrive/framework/downloads","issues_url":"https://api.github.com/repos/OpenMotorDrive/framework/issues{/number}","pulls_url":"https://api.github.com/repos/OpenMotorDrive/framework/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenMotorDrive/framework/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenMotorDrive/framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenMotorDrive/framework/labels{/name}","releases_url":"https://api.github.com/repos/OpenMotorDrive/framework/releases{/id}","deployments_url":"https://api.github.com/repos/OpenMotorDrive/framework/deployments","created_at":"2017-11-09T23:40:13Z","updated_at":"2017-11-10T00:04:24Z","pushed_at":"2017-11-13T03:09:47Z","git_url":"git://github.com/OpenMotorDrive/framework.git","ssh_url":"git@github.com:OpenMotorDrive/framework.git","clone_url":"https://github.com/OpenMotorDrive/framework.git","svn_url":"https://github.com/OpenMotorDrive/framework","homepage":null,"size":9111,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenMotorDrive/framework/pulls/1"},"html":{"href":"https://github.com/OpenMotorDrive/framework/pull/1"},"issue":{"href":"https://api.github.com/repos/OpenMotorDrive/framework/issues/1"},"comments":{"href":"https://api.github.com/repos/OpenMotorDrive/framework/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenMotorDrive/framework/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenMotorDrive/framework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenMotorDrive/framework/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/OpenMotorDrive/framework/statuses/c95feb89fb2c09ab3aaa4aedaaaa75e407e6b8c3"}},"author_association":"NONE"}}
{"actor":{"display_login":"jschall"}}