Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restrict indefinite-length data items #23

Closed
schomatis opened this issue Jul 1, 2020 · 0 comments · Fixed by #25
Closed

Restrict indefinite-length data items #23

schomatis opened this issue Jul 1, 2020 · 0 comments · Fixed by #25

Comments

@schomatis
Copy link
Collaborator

The standard does not impose any restriction for these but we need a sane value that reflects the limitations of the implementation. Same for nested items.

Additionally any allocation should have a single point of entry where this restrictions is enforced.

This mostly concerns the Deferred type,

buf := make([]byte, int(extra)+len(header))

cbor-gen/utils.go

Lines 142 to 144 in 6496743

for i := 0; i < int(extra); i++ {
sub := new(Deferred)
if err := sub.UnmarshalCBOR(br); err != nil {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant