MCPcopy Create free account
hub / github.com/avast/retdec / byte_array_init

Function byte_array_init

deps/authenticode-parser/src/helper.c:59–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57}
58
59int byte_array_init(ByteArray* arr, const uint8_t* data, int len)
60{
61 if (len == 0) {
62 arr->data = NULL;
63 arr->len = 0;
64 return 0;
65 }
66
67 arr->data = (uint8_t*)malloc(len);
68 if (!arr->data)
69 return -1;
70
71 arr->len = len;
72 memcpy(arr->data, data, len);
73 return 0;
74}
75
76time_t ASN1_TIME_to_time_t(const ASN1_TIME* time)
77{

Callers 4

parse_name_attributesFunction · 0.85
authenticode_newFunction · 0.85
pkcs9_countersig_newFunction · 0.85
ms_countersig_newFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected