MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / pick_some_command

Function pick_some_command

test/fuzz/fuzz_core_funcs.c:80–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80const cmd_export_t *
81pick_some_command(uint8_t datap)
82{
83 const int ncmds = count_noparam_cmds();
84 int i, r, idx = datap % (ncmds + 1);
85
86 if (idx == ncmds)
87 return (0);
88 for (i = r = 0; core_cmds[i].name != NULL; i++) {
89 if (core_cmds[i].params[0].flags != 0)
90 continue;
91 if (r == idx)
92 return &core_cmds[i];
93 r += 1;
94 }
95 abort();
96}
97
98int LLVMFuzzerTestOneInput(const char *data, size_t size) {
99 str buf;

Callers 1

LLVMFuzzerTestOneInputFunction · 0.85

Calls 1

count_noparam_cmdsFunction · 0.85

Tested by

no test coverage detected