mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Upgrade libsrtp from 2.0.0 to 2.3.0, with source code. 4.0.79
This commit is contained in:
parent
3749d4d833
commit
8089fc004c
111 changed files with 45307 additions and 5 deletions
25
trunk/3rdparty/libsrtp-2-fit/fuzzer/testmem.c
vendored
Normal file
25
trunk/3rdparty/libsrtp-2-fit/fuzzer/testmem.c
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef FUZZ_MSAN
|
||||
#include <stdio.h>
|
||||
static void fuzz_testmem_msan(void *data, size_t size)
|
||||
{
|
||||
/* This is a trick to force MemorySanitizer to evaluate the data at hand */
|
||||
FILE *fp = fopen("/dev/null", "wb");
|
||||
fwrite(data, size, 1, fp);
|
||||
fclose(fp);
|
||||
}
|
||||
#endif
|
||||
|
||||
void fuzz_testmem(void *data, size_t size)
|
||||
{
|
||||
#ifdef FUZZ_MSAN
|
||||
fuzz_testmem_msan(data, size);
|
||||
#endif
|
||||
uint8_t *copy = malloc(size);
|
||||
memcpy(copy, data, size);
|
||||
free(copy);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue