@@ -195,7 +195,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
goto cleanup;
errno = 0;
- rc = load_mmap(fp, fcontext_data1_len, &rec, MEMFD_FILE_NAME);
+ rc = load_mmap(fp, fcontext_data1_len, &rec, MEMFD_FILE_NAME, 0);
if (rc) {
assert(errno != 0);
goto cleanup;
@@ -208,7 +208,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
goto cleanup;
errno = 0;
- rc = load_mmap(fp, fcontext_data2_len, &rec, MEMFD_FILE_NAME);
+ rc = load_mmap(fp, fcontext_data2_len, &rec, MEMFD_FILE_NAME, 1);
if (rc) {
assert(errno != 0);
goto cleanup;
@@ -221,7 +221,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
goto cleanup;
errno = 0;
- rc = load_mmap(fp, fcontext_data3_len, &rec, MEMFD_FILE_NAME);
+ rc = load_mmap(fp, fcontext_data3_len, &rec, MEMFD_FILE_NAME, 2);
if (rc) {
assert(errno != 0);
goto cleanup;
@@ -167,7 +167,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
goto cleanup;
errno = 0;
- rc = process_text_file(fp, /*prefix=*/ NULL, &rec, MEMFD_FILE_NAME);
+ rc = process_text_file(fp, /*prefix=*/ NULL, &rec, MEMFD_FILE_NAME, 0);
if (rc) {
assert(errno != 0);
goto cleanup;
@@ -60,7 +60,7 @@ struct lookup_result {
struct lookup_result *next;
};
#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
-extern int load_mmap(FILE *fp, const size_t len, struct selabel_handle *rec, const char *path);
+extern int load_mmap(FILE *fp, const size_t len, struct selabel_handle *rec, const char *path, uint8_t inputno);
extern int process_text_file(FILE *fp, const char *prefix, struct selabel_handle *rec, const char *path, uint8_t inputno);
extern void free_lookup_result(struct lookup_result *result);
extern struct lookup_result *lookup_all(struct selabel_handle *rec, const char *key, int type, bool partial, bool find_all, struct lookup_result *buf);