{"action":"created","issue":{"url":"https://api.github.com/repos/CESNET/libnetconf/issues/162","repository_url":"https://api.github.com/repos/CESNET/libnetconf","labels_url":"https://api.github.com/repos/CESNET/libnetconf/issues/162/labels{/name}","comments_url":"https://api.github.com/repos/CESNET/libnetconf/issues/162/comments","events_url":"https://api.github.com/repos/CESNET/libnetconf/issues/162/events","html_url":"https://github.com/CESNET/libnetconf/issues/162","id":137167391,"number":162,"title":"libnetconf filter crashing with segmentation fault","user":{"login":"ntadas","id":16400262,"avatar_url":"https://avatars.githubusercontent.com/u/16400262?v=3","gravatar_id":"","url":"https://api.github.com/users/ntadas","html_url":"https://github.com/ntadas","followers_url":"https://api.github.com/users/ntadas/followers","following_url":"https://api.github.com/users/ntadas/following{/other_user}","gists_url":"https://api.github.com/users/ntadas/gists{/gist_id}","starred_url":"https://api.github.com/users/ntadas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ntadas/subscriptions","organizations_url":"https://api.github.com/users/ntadas/orgs","repos_url":"https://api.github.com/users/ntadas/repos","events_url":"https://api.github.com/users/ntadas/events{/privacy}","received_events_url":"https://api.github.com/users/ntadas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-29T06:48:25Z","updated_at":"2016-02-29T09:49:38Z","closed_at":null,"body":"I'm able to reproduce this crash with this simple example:\r\n\r\nData base is always returning:\r\n\r\n    <?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\r\n    <top xmlns=\"urn:test:containers:att\">\r\n      <container1>\r\n        <container1-id>1</container1-id>\r\n        <container2>\r\n          <container2-id>1</container2-id>\r\n          <name>test</name>\r\n          <container3>\r\n            <att1></att1>\r\n          </container3>\r\n        </container2>\r\n        <container2>\r\n          <container2-id>2</container2-id>\r\n          <name></name>\r\n        </container2>\r\n      </container1>\r\n    </top>\r\n\r\nthen if I do a get with the filter:\r\n\r\n    <top>\r\n        <container1>\r\n            <container2>\r\n                <name></name>\r\n                <conteiner3/>\r\n            </container2>\r\n        </container1>\r\n    </top>\r\n\r\nit works fine I get the reply:\r\n\r\n    <top xmlns=\"urn:test:containers:att\">\r\n        <container1>\r\n          <container2>\r\n            <name>test</name>\r\n          </container2>\r\n          <container2>\r\n            <name/>\r\n          </container2>\r\n        </container1>\r\n      </top>\r\n\r\nbut if I use the filter:\r\n\r\n    <top>\r\n        <container1>\r\n            <container2>\r\n                <name>test</name>\r\n                <conteiner3/>\r\n            </container2>\r\n        </container1>\r\n    </top>\r\n\r\nit crashes in this call: `if (ncxml_filter(doc_merged->children, filter, &node, ds->ext_model) != 0)`\r\n"},"comment":{"url":"https://api.github.com/repos/CESNET/libnetconf/issues/comments/190128715","html_url":"https://github.com/CESNET/libnetconf/issues/162#issuecomment-190128715","issue_url":"https://api.github.com/repos/CESNET/libnetconf/issues/162","id":190128715,"user":{"login":"michalvasko","id":12510224,"avatar_url":"https://avatars.githubusercontent.com/u/12510224?v=3","gravatar_id":"","url":"https://api.github.com/users/michalvasko","html_url":"https://github.com/michalvasko","followers_url":"https://api.github.com/users/michalvasko/followers","following_url":"https://api.github.com/users/michalvasko/following{/other_user}","gists_url":"https://api.github.com/users/michalvasko/gists{/gist_id}","starred_url":"https://api.github.com/users/michalvasko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalvasko/subscriptions","organizations_url":"https://api.github.com/users/michalvasko/orgs","repos_url":"https://api.github.com/users/michalvasko/repos","events_url":"https://api.github.com/users/michalvasko/events{/privacy}","received_events_url":"https://api.github.com/users/michalvasko/received_events","type":"User","site_admin":false},"created_at":"2016-02-29T09:49:38Z","updated_at":"2016-02-29T09:49:38Z","body":"Hi,\r\nwhat is the model you are using? If container2 is not actually a list, your data are invalid.\r\n\r\nRegards,\r\nMichal"}}