{"action":"created","issue":{"url":"https://api.github.com/repos/splone/splonebox-core/issues/1","labels_url":"https://api.github.com/repos/splone/splonebox-core/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/splone/splonebox-core/issues/1/comments","events_url":"https://api.github.com/repos/splone/splonebox-core/issues/1/events","html_url":"https://github.com/splone/splonebox-core/issues/1","id":119383616,"number":1,"title":"params->size is not set in unpack.c","user":{"login":"bontric","id":6393673,"avatar_url":"https://avatars.githubusercontent.com/u/6393673?v=3","gravatar_id":"","url":"https://api.github.com/users/bontric","html_url":"https://github.com/bontric","followers_url":"https://api.github.com/users/bontric/followers","following_url":"https://api.github.com/users/bontric/following{/other_user}","gists_url":"https://api.github.com/users/bontric/gists{/gist_id}","starred_url":"https://api.github.com/users/bontric/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bontric/subscriptions","organizations_url":"https://api.github.com/users/bontric/orgs","repos_url":"https://api.github.com/users/bontric/repos","events_url":"https://api.github.com/users/bontric/events{/privacy}","received_events_url":"https://api.github.com/users/bontric/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-29T20:00:36Z","updated_at":"2015-11-29T20:44:10Z","closed_at":null,"body":"The *size* field of `params` (`message_params_object`) needs to be set.\r\n\r\n```c \r\n//... (Line 81)\r\n /* if array is empty return success */\r\n  if (obj->via.array.size <= 0) {\r\n    params->obj = NULL;\r\n    params->size = 0;\r\n    return (0);\r\n  }\r\n\r\n  params->obj = CALLOC(obj->via.array.size, struct message_object);\r\n// ...\r\n```\r\n\r\nThe following line should be added after allocating the memory.\r\n\r\n```c\r\nparams->size = obj->via.array.size;\r\n```"},"comment":{"url":"https://api.github.com/repos/splone/splonebox-core/issues/comments/160469562","html_url":"https://github.com/splone/splonebox-core/issues/1#issuecomment-160469562","issue_url":"https://api.github.com/repos/splone/splonebox-core/issues/1","id":160469562,"user":{"login":"stze","id":640612,"avatar_url":"https://avatars.githubusercontent.com/u/640612?v=3","gravatar_id":"","url":"https://api.github.com/users/stze","html_url":"https://github.com/stze","followers_url":"https://api.github.com/users/stze/followers","following_url":"https://api.github.com/users/stze/following{/other_user}","gists_url":"https://api.github.com/users/stze/gists{/gist_id}","starred_url":"https://api.github.com/users/stze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stze/subscriptions","organizations_url":"https://api.github.com/users/stze/orgs","repos_url":"https://api.github.com/users/stze/repos","events_url":"https://api.github.com/users/stze/events{/privacy}","received_events_url":"https://api.github.com/users/stze/received_events","type":"User","site_admin":false},"created_at":"2015-11-29T20:44:10Z","updated_at":"2015-11-29T20:44:10Z","body":"The *size* of `params` is set. *size* only needs to be set if params is NULL. Maybe you misread the following line (memory allocation):\r\n\r\n`params->obj = CALLOC(obj->via.array.size, struct message_object);`\r\n\r\nnot `message_params_object` is allocated, a `message_object` is allocated, so no `size` needs to be set.\r\n\r\nclose?"}}