Skip to content

Commit 762707f

Browse files
committed
Don't use written parameter of macro directly
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
1 parent 7eada8c commit 762707f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/headers/tomcrypt_pk.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -739,9 +739,10 @@ typedef struct ltc_asn1_list_ {
739739
#define LTC_SET_ASN1_CUSTOM_PRIMITIVE(list, index, Class, Tag, Type, Data, Size) \
740740
do { \
741741
int LTC_TMPVAR(SACP) = (index); \
742+
ltc_asn1_list *LTC_TMPVAR(SACP_list) = (list); \
742743
LTC_SET_ASN1(list, LTC_TMPVAR(SACP), LTC_ASN1_CUSTOM_TYPE, Data, Size); \
743744
LTC_SET_ASN1_IDENTIFIER(list, LTC_TMPVAR(SACP), Class, LTC_ASN1_PC_PRIMITIVE, Tag); \
744-
list[LTC_TMPVAR(SACP)].used = (int)(Type); \
745+
LTC_TMPVAR(SACP_list)[LTC_TMPVAR(SACP)].used = (int)(Type); \
745746
} while (0)
746747

747748
extern const char* der_asn1_class_to_string_map[];

0 commit comments

Comments
 (0)