Skip to content

Commit cbd2a1c

Browse files
committed
HOTFIX: segfault when copying attributes within ASn.1 sequences
--- + Preparing for release v0.2.4
1 parent 3544473 commit cbd2a1c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/icspacket/include/skeletons/py_application.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ static PyObject* PyCompat_Encode(enum asn_transfer_syntax ats,
876876
typeName##_t* src, PyObject* parent) { \
877877
void* target = (void*)&src->attrName; \
878878
return PyCompatAsnType_FromParent(&PyAsn##targetTypeName##_Type, \
879-
parent, (void*)src); \
879+
parent, target); \
880880
}
881881

882882
#define PY_IMPL_SEQ_REF_ATTR_INDIRECT_TOPY(typeName, attrName, targetTypeName) \
@@ -885,7 +885,7 @@ static PyObject* PyCompat_Encode(enum asn_transfer_syntax ats,
885885
void* target = (void*)src->attrName; \
886886
if (target == NULL) Py_RETURN_NONE; \
887887
return PyCompatAsnType_FromParent(&PyAsn##targetTypeName##_Type, \
888-
parent, (void*)src); \
888+
parent, target); \
889889
}
890890

891891
#define PY_IMPL_SEQ_OPT_GETATTR(typeName, attrName) \

0 commit comments

Comments
 (0)