{"action":"created","issue":{"url":"https://api.github.com/repos/ciaa/Firmware/issues/444","repository_url":"https://api.github.com/repos/ciaa/Firmware","labels_url":"https://api.github.com/repos/ciaa/Firmware/issues/444/labels{/name}","comments_url":"https://api.github.com/repos/ciaa/Firmware/issues/444/comments","events_url":"https://api.github.com/repos/ciaa/Firmware/issues/444/events","html_url":"https://github.com/ciaa/Firmware/issues/444","id":179675610,"number":444,"title":"Pointer to lseek is left uninitialized in ciaaSerialDevices_addDriver()","user":{"login":"glpuga","id":17802342,"avatar_url":"https://avatars.githubusercontent.com/u/17802342?v=3","gravatar_id":"","url":"https://api.github.com/users/glpuga","html_url":"https://github.com/glpuga","followers_url":"https://api.github.com/users/glpuga/followers","following_url":"https://api.github.com/users/glpuga/following{/other_user}","gists_url":"https://api.github.com/users/glpuga/gists{/gist_id}","starred_url":"https://api.github.com/users/glpuga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glpuga/subscriptions","organizations_url":"https://api.github.com/users/glpuga/orgs","repos_url":"https://api.github.com/users/glpuga/repos","events_url":"https://api.github.com/users/glpuga/events{/privacy}","received_events_url":"https://api.github.com/users/glpuga/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ciaa/Firmware/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/ciaa/Firmware/labels/Posix","name":"Posix","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-28T04:06:41Z","updated_at":"2016-09-29T14:12:16Z","closed_at":null,"body":"The following fragment of ciaaSerialDevices_addDriver() in ciaaSerialDevices.c should probably also copy the pointer for lseek, or set it to NULL if is not used for this kind of device.\r\n\r\n```\r\n/* allocate memory for new device */\r\nnewDevice = (ciaaDevices_deviceType*) ciaak_malloc(sizeof(ciaaDevices_deviceType));\r\n\r\n/* set functions for this device */\r\nnewDevice->open = ciaaSerialDevices_open;\r\nnewDevice->close = ciaaSerialDevices_close;\r\nnewDevice->ioctl = ciaaSerialDevices_ioctl;\r\nnewDevice->read = ciaaSerialDevices_read;\r\nnewDevice->write = ciaaSerialDevices_write;\r\n\r\n/* store layers information information */\r\nnewDevice->layer = (void *) &ciaaSerialDevices.devstr[position];\r\nnewDevice->loLayer = (void *) driver;\r\n```"},"comment":{"url":"https://api.github.com/repos/ciaa/Firmware/issues/comments/250477514","html_url":"https://github.com/ciaa/Firmware/issues/444#issuecomment-250477514","issue_url":"https://api.github.com/repos/ciaa/Firmware/issues/444","id":250477514,"user":{"login":"mcerdeiro","id":7267483,"avatar_url":"https://avatars.githubusercontent.com/u/7267483?v=3","gravatar_id":"","url":"https://api.github.com/users/mcerdeiro","html_url":"https://github.com/mcerdeiro","followers_url":"https://api.github.com/users/mcerdeiro/followers","following_url":"https://api.github.com/users/mcerdeiro/following{/other_user}","gists_url":"https://api.github.com/users/mcerdeiro/gists{/gist_id}","starred_url":"https://api.github.com/users/mcerdeiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcerdeiro/subscriptions","organizations_url":"https://api.github.com/users/mcerdeiro/orgs","repos_url":"https://api.github.com/users/mcerdeiro/repos","events_url":"https://api.github.com/users/mcerdeiro/events{/privacy}","received_events_url":"https://api.github.com/users/mcerdeiro/received_events","type":"User","site_admin":false},"created_at":"2016-09-29T14:12:15Z","updated_at":"2016-09-29T14:12:15Z","body":"Hello Gerardo,\n\nThis is a serial driver so it doesn't have a lseek. So I guess it shall\nnever been called. If so we have to set it to null.\n\nWhat do you think?\n\nAm 28.09.2016 6:06 AM schrieb \"Gerardo Puga\" <notifications@github.com>:\n\n> The following fragment of ciaaSerialDevices_addDriver() in\n> ciaaSerialDevices.c should probably also copy the pointer for lseek.\n>\n> /* allocate memory for new device */\n> newDevice = (ciaaDevices_deviceType*) ciaak_malloc(sizeof(ciaaDevices_deviceType));\n>\n> /* set functions for this device */\n> newDevice->open = ciaaSerialDevices_open;\n> newDevice->close = ciaaSerialDevices_close;\n> newDevice->ioctl = ciaaSerialDevices_ioctl;\n> newDevice->read = ciaaSerialDevices_read;\n> newDevice->write = ciaaSerialDevices_write;\n>\n> /* store layers information information */\n> newDevice->layer = (void *) &ciaaSerialDevices.devstr[position];\n> newDevice->loLayer = (void *) driver;\n>\n> —\n> You are receiving this because you are subscribed to this thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/ciaa/Firmware/issues/444>, or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AG7km9NBNbCh35wnIquGbvub7nw0V-o2ks5quefSgaJpZM4KIZV9>\n> .\n>\n"}}
{"actor":{"display_login":"mcerdeiro"}}