quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

fuzz_pkcs7.c (359B)


      1 #include <stdint.h>
      2 #include "mbedtls/pkcs7.h"
      3 #include "common.h"
      4 
      5 int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size)
      6 {
      7 #ifdef MBEDTLS_PKCS7_C
      8     mbedtls_pkcs7 pkcs7;
      9 
     10     mbedtls_pkcs7_init(&pkcs7);
     11 
     12     mbedtls_pkcs7_parse_der(&pkcs7, Data, Size);
     13 
     14     mbedtls_pkcs7_free(&pkcs7);
     15 #else
     16     (void) Data;
     17     (void) Size;
     18 #endif
     19 
     20     return 0;
     21 }