{"action":"created","issue":{"url":"https://api.github.com/repos/AVnu/Open-AVB/issues/468","repository_url":"https://api.github.com/repos/AVnu/Open-AVB","labels_url":"https://api.github.com/repos/AVnu/Open-AVB/issues/468/labels{/name}","comments_url":"https://api.github.com/repos/AVnu/Open-AVB/issues/468/comments","events_url":"https://api.github.com/repos/AVnu/Open-AVB/issues/468/events","html_url":"https://github.com/AVnu/Open-AVB/pull/468","id":175227120,"number":468,"title":"Open avb next - issue #460","user":{"login":"jfornal","id":20085434,"avatar_url":"https://avatars.githubusercontent.com/u/20085434?v=3","gravatar_id":"","url":"https://api.github.com/users/jfornal","html_url":"https://github.com/jfornal","followers_url":"https://api.github.com/users/jfornal/followers","following_url":"https://api.github.com/users/jfornal/following{/other_user}","gists_url":"https://api.github.com/users/jfornal/gists{/gist_id}","starred_url":"https://api.github.com/users/jfornal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfornal/subscriptions","organizations_url":"https://api.github.com/users/jfornal/orgs","repos_url":"https://api.github.com/users/jfornal/repos","events_url":"https://api.github.com/users/jfornal/events{/privacy}","received_events_url":"https://api.github.com/users/jfornal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-06T11:48:03Z","updated_at":"2016-09-08T17:57:10Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/AVnu/Open-AVB/pulls/468","html_url":"https://github.com/AVnu/Open-AVB/pull/468","diff_url":"https://github.com/AVnu/Open-AVB/pull/468.diff","patch_url":"https://github.com/AVnu/Open-AVB/pull/468.patch"},"body":"This is a proposed solution for Andrew Elder's suggestion: changes made to \"toByteString()\" methods in gptp/common/avbts_message.hpp and gptp/common/ptp_message.cpp:\r\n\r\na) Added a sizeof_byte_str_array parameter to all three \"toByteString\" methods (SignallingTLV and FollowupTLV are used, scaledNS has been altered for future reference and consistency purposes)\r\n\r\nb) A separate \"available_size\" variable is being created before each of the method invocation . It is being initialized with space left available in the buffer (buf_t) to which the data is being copied further on \r\n"},"comment":{"url":"https://api.github.com/repos/AVnu/Open-AVB/issues/comments/245683319","html_url":"https://github.com/AVnu/Open-AVB/pull/468#issuecomment-245683319","issue_url":"https://api.github.com/repos/AVnu/Open-AVB/issues/468","id":245683319,"user":{"login":"pinealservo","id":1038011,"avatar_url":"https://avatars.githubusercontent.com/u/1038011?v=3","gravatar_id":"","url":"https://api.github.com/users/pinealservo","html_url":"https://github.com/pinealservo","followers_url":"https://api.github.com/users/pinealservo/followers","following_url":"https://api.github.com/users/pinealservo/following{/other_user}","gists_url":"https://api.github.com/users/pinealservo/gists{/gist_id}","starred_url":"https://api.github.com/users/pinealservo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pinealservo/subscriptions","organizations_url":"https://api.github.com/users/pinealservo/orgs","repos_url":"https://api.github.com/users/pinealservo/repos","events_url":"https://api.github.com/users/pinealservo/events{/privacy}","received_events_url":"https://api.github.com/users/pinealservo/received_events","type":"User","site_admin":false},"created_at":"2016-09-08T17:57:10Z","updated_at":"2016-09-08T17:57:10Z","body":"The easiest thing to do here is nothing; I don't think there's actually an existing bug that this is required to fix, is there? \r\n\r\nI also have no objections to just adding a check after`getPayloadOffset` to ensure there's enough room for the `memcpy` and `tlv->toByteString` calls to succeed.  If that's done, we should ensure that we bail without sending the packet if the size check fails.\r\n\r\nAnd if you would prefer to have checks in `toByteString` anyway, that's fine too; we just need to also ensure in this case that we don't try to send a packet for which we haven't allocated enough buffer space for the length we're telling the transmitter we're giving it.  That's basically this pull request plus early exits when `toByteString` fails.\r\n\r\nOr we could try to do something fancier that is safe and also low-overhead.  I wouldn't oppose that, but I don't have time to commit to it either."}}
{"actor":{"display_login":"pinealservo"}}