github.com/google/syzkaller@v0.0.0-20251211124644-a066d2bc4b02/pkg/kfuzztest/testdata/1/prog.c (about)

     1  // Copyright 2025 syzkaller project authors. All rights reserved.
     2  // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
     3  #include "../common.h"
     4  
     5  #include <stdio.h>
     6  #include <stdlib.h>
     7  
     8  struct pkcs7_parse_message_arg {
     9  	const void* data;
    10  	size_t datalen;
    11  };
    12  
    13  DEFINE_FUZZ_TARGET(test_pkcs7_parse_message, struct pkcs7_parse_message_arg);
    14  /* Expect data != NULL. */
    15  DEFINE_CONSTRAINT(pkcs7_parse_message_arg, data, NULL, NULL, EXPECT_NE);
    16  /* Expect datalen == len(data). */
    17  DEFINE_ANNOTATION(pkcs7_parse_message_arg, datalen, data, ATTRIBUTE_LEN);
    18  /* Annotate data as an array. */
    19  DEFINE_ANNOTATION(pkcs7_parse_message_arg, data, , ATTRIBUTE_ARRAY);
    20  
    21  /* Define a main function, otherwise the compiler complains. */
    22  int main(void)
    23  {
    24  }