Skip to content

enforce the depth limit for cbor decoder#736

Merged
TingDaoK merged 4 commits into
mainfrom
cbor-decoder-depth-limit
May 21, 2026
Merged

enforce the depth limit for cbor decoder#736
TingDaoK merged 4 commits into
mainfrom
cbor-decoder-depth-limit

Conversation

@TingDaoK
Copy link
Copy Markdown
Contributor

@TingDaoK TingDaoK commented May 19, 2026

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Comment thread source/cbor.c
return s_cbor_encoder_write_pyobject_as_text(encoder, py_object);
} else if (PyList_Check(py_object)) {
result = s_cbor_encoder_write_pyobject_as_text(encoder, py_object);
} else if (PyType_IsSubtype((PyTypeObject *)type, &PyList_Type)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question for my own understanding.. was there a specific sub type under list which made us shift from check to IsSubtype?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ignore this, I understand it now

@TingDaoK TingDaoK enabled auto-merge (squash) May 21, 2026 21:43
@TingDaoK TingDaoK merged commit e03226c into main May 21, 2026
80 checks passed
@TingDaoK TingDaoK deleted the cbor-decoder-depth-limit branch May 21, 2026 21:55
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 this pull request may close these issues.

2 participants