{"action":"created","issue":{"url":"https://api.github.com/repos/esnacc/esnacc-ng/issues/46","repository_url":"https://api.github.com/repos/esnacc/esnacc-ng","labels_url":"https://api.github.com/repos/esnacc/esnacc-ng/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/esnacc/esnacc-ng/issues/46/comments","events_url":"https://api.github.com/repos/esnacc/esnacc-ng/issues/46/events","html_url":"https://github.com/esnacc/esnacc-ng/issues/46","id":321829301,"node_id":"MDU6SXNzdWUzMjE4MjkzMDE=","number":46,"title":"BUG in decoding ANY DEFINED BY ","user":{"login":"jarek556","id":13468824,"node_id":"MDQ6VXNlcjEzNDY4ODI0","avatar_url":"https://avatars3.githubusercontent.com/u/13468824?v=4","gravatar_id":"","url":"https://api.github.com/users/jarek556","html_url":"https://github.com/jarek556","followers_url":"https://api.github.com/users/jarek556/followers","following_url":"https://api.github.com/users/jarek556/following{/other_user}","gists_url":"https://api.github.com/users/jarek556/gists{/gist_id}","starred_url":"https://api.github.com/users/jarek556/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jarek556/subscriptions","organizations_url":"https://api.github.com/users/jarek556/orgs","repos_url":"https://api.github.com/users/jarek556/repos","events_url":"https://api.github.com/users/jarek556/events{/privacy}","received_events_url":"https://api.github.com/users/jarek556/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"orgcandman","id":1092926,"node_id":"MDQ6VXNlcjEwOTI5MjY=","avatar_url":"https://avatars1.githubusercontent.com/u/1092926?v=4","gravatar_id":"","url":"https://api.github.com/users/orgcandman","html_url":"https://github.com/orgcandman","followers_url":"https://api.github.com/users/orgcandman/followers","following_url":"https://api.github.com/users/orgcandman/following{/other_user}","gists_url":"https://api.github.com/users/orgcandman/gists{/gist_id}","starred_url":"https://api.github.com/users/orgcandman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orgcandman/subscriptions","organizations_url":"https://api.github.com/users/orgcandman/orgs","repos_url":"https://api.github.com/users/orgcandman/repos","events_url":"https://api.github.com/users/orgcandman/events{/privacy}","received_events_url":"https://api.github.com/users/orgcandman/received_events","type":"User","site_admin":false},"assignees":[{"login":"orgcandman","id":1092926,"node_id":"MDQ6VXNlcjEwOTI5MjY=","avatar_url":"https://avatars1.githubusercontent.com/u/1092926?v=4","gravatar_id":"","url":"https://api.github.com/users/orgcandman","html_url":"https://github.com/orgcandman","followers_url":"https://api.github.com/users/orgcandman/followers","following_url":"https://api.github.com/users/orgcandman/following{/other_user}","gists_url":"https://api.github.com/users/orgcandman/gists{/gist_id}","starred_url":"https://api.github.com/users/orgcandman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orgcandman/subscriptions","organizations_url":"https://api.github.com/users/orgcandman/orgs","repos_url":"https://api.github.com/users/orgcandman/repos","events_url":"https://api.github.com/users/orgcandman/events{/privacy}","received_events_url":"https://api.github.com/users/orgcandman/received_events","type":"User","site_admin":false}],"milestone":null,"comments":6,"created_at":"2018-05-10T06:54:16Z","updated_at":"2018-07-26T16:45:52Z","closed_at":null,"author_association":"NONE","body":"The following structure \r\n```\r\nContentInfo ::= SEQUENCE {\r\n       contentType ContentType,\r\n       content [0] EXPLICIT ANY DEFINED BY contentType }\r\n```\r\nis not properly decoded with current esnacc, but works fine with old esnacc 1.7.4.\r\nIt looks that current esnacc can't properly count size of NDEF BER encoded data:\r\n\r\n ```\r\n  0 NDEF: SEQUENCE {\r\n   2    9:   OBJECT IDENTIFIER signedData (1 2 840 113549 1 7 2)\r\n  13 NDEF:   [0] {\r\n  15 NDEF:     SEQUENCE {\r\n  17    1:       INTEGER 1\r\n  20   15:       SET {\r\n  22   13:         SEQUENCE {\r\n  24    9:           OBJECT IDENTIFIER sha-256 (2 16 840 1 101 3 4 2 1)\r\n  35    0:           NULL\r\n         :           }\r\n         :         } \r\n-------------------------- here ConsStringDeck::Fill stops counting size\r\n  37 NDEF:       SEQUENCE {\r\n  39    9:         OBJECT IDENTIFIER data (1 2 840 113549 1 7 1)\r\n  50 NDEF:         [0] {\r\n  52  101:           OCTET STRING, encapsulates {\r\n  54   99:             SEQUENCE {\r\n```\r\n\r\n\r\nThe problematic change is in asn-octs.cpp ConsStringDeck::Fill:\r\n\r\n```\r\n619c614\r\n<         for (; (curr != refList.end()) && ((curr->count < curr->length) || (curr->length == INDEFINITE_LEN));)\r\n---\r\n>         for (; (curr->count < curr->length) || (curr->length == INDEFINITE_LEN);)\r\n711c706\r\n<         if( curr != refList.begin() && curr != refList.end() )\r\n---\r\n>         if( curr != refList.begin() )\r\n714,718c709,712\r\n<             curr = refList.erase(curr);\r\n<             if( curr != refList.end() )\r\n<                 curr->count += iTmpCount;\r\n<             else\r\n<                 done = true;\r\n---\r\n>             refList.erase(curr);\r\n>             curr = refList.end();\r\n>             --curr;\r\n>             curr->count += iTmpCount;\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/esnacc/esnacc-ng/issues/comments/408161006","html_url":"https://github.com/esnacc/esnacc-ng/issues/46#issuecomment-408161006","issue_url":"https://api.github.com/repos/esnacc/esnacc-ng/issues/46","id":408161006,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODE2MTAwNg==","user":{"login":"orgcandman","id":1092926,"node_id":"MDQ6VXNlcjEwOTI5MjY=","avatar_url":"https://avatars1.githubusercontent.com/u/1092926?v=4","gravatar_id":"","url":"https://api.github.com/users/orgcandman","html_url":"https://github.com/orgcandman","followers_url":"https://api.github.com/users/orgcandman/followers","following_url":"https://api.github.com/users/orgcandman/following{/other_user}","gists_url":"https://api.github.com/users/orgcandman/gists{/gist_id}","starred_url":"https://api.github.com/users/orgcandman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orgcandman/subscriptions","organizations_url":"https://api.github.com/users/orgcandman/orgs","repos_url":"https://api.github.com/users/orgcandman/repos","events_url":"https://api.github.com/users/orgcandman/events{/privacy}","received_events_url":"https://api.github.com/users/orgcandman/received_events","type":"User","site_admin":false},"created_at":"2018-07-26T16:45:52Z","updated_at":"2018-07-26T16:45:52Z","author_association":"MEMBER","body":"Sorry about this.  I'll submit a bunch of patches to the mailing list by tomorrow EOB."}}
{"actor":{"display_login":"orgcandman"}}