Coverage Report

Created: 2025-12-11 06:16

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/librabbitmq/fuzz/fuzz_table.c
Line
Count
Source
1
// Copyright 2007 - 2022, Alan Antonuk and the rabbitmq-c contributors.
2
// SPDX-License-Identifier: mit
3
4
#include <errno.h>
5
#include <inttypes.h>
6
#include <math.h>
7
#include <stdarg.h>
8
#include <stdio.h>
9
#include <stdlib.h>
10
#include <string.h>
11
12
#include <rabbitmq-c/amqp.h>
13
14
978
extern int LLVMFuzzerTestOneInput(const char *data, size_t size) {
15
16
978
  int unused_result;
17
978
  amqp_pool_t pool;
18
19
978
  init_amqp_pool(&pool, 4096);
20
978
  {
21
978
    amqp_table_t decoded;
22
978
    size_t decoding_offset = 0;
23
978
    amqp_bytes_t decoding_bytes;
24
978
    decoding_bytes.len = size;
25
978
    decoding_bytes.bytes = (uint8_t *)data;
26
27
978
    unused_result =
28
978
        amqp_decode_table(decoding_bytes, &pool, &decoded, &decoding_offset);
29
978
  }
30
978
  empty_amqp_pool(&pool);
31
978
  return 0;
32
978
}