mirror of https://github.com/google/oss-fuzz.git
[Nginx] fixing startup crashes (#4425)
* fixing startup crashes * Removed whitespaces
This commit is contained in:
parent
26cb1c648c
commit
dc44763e9e
|
@ -24,7 +24,7 @@ rm -rf genfiles && mkdir genfiles && $SRC/LPM/external.protobuf/bin/protoc http_
|
|||
cd ../..
|
||||
|
||||
auto/configure \
|
||||
--with-ld-opt="-Wl,--wrap=listen -Wl,--wrap=setsockopt -Wl,--wrap=bind -Wl,--wrap=shutdown -Wl,--wrap=connect -Wl,--wrap=getpwnam -Wl,--wrap=getgrnam" \
|
||||
--with-ld-opt="-Wl,--wrap=listen -Wl,--wrap=setsockopt -Wl,--wrap=bind -Wl,--wrap=shutdown -Wl,--wrap=connect -Wl,--wrap=getpwnam -Wl,--wrap=getgrnam -Wl,--wrap=chmod -Wl,--wrap=chown" \
|
||||
--with-http_v2_module
|
||||
make -f objs/Makefile fuzzers
|
||||
|
||||
|
|
|
@ -30,7 +30,6 @@ extern "C" {
|
|||
#include "libprotobuf-mutator/src/libfuzzer/libfuzzer_macro.h"
|
||||
|
||||
static char configuration[] =
|
||||
"user root;\n"
|
||||
"error_log stderr emerg;\n"
|
||||
"events {\n"
|
||||
" use epoll;\n"
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
#include <sys/socket.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <grp.h>
|
||||
#include <pwd.h>
|
||||
|
||||
|
@ -35,6 +36,14 @@ int __wrap_setsockopt(int fd, int level, int optname, const void *optval,
|
|||
return 0;
|
||||
}
|
||||
|
||||
int __wrap_chmod(const char *pathname, mode_t mode){
|
||||
return 0;
|
||||
}
|
||||
|
||||
int __wrap_chown(const char *pathname, uid_t owner, gid_t group){
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct passwd *__wrap_getpwnam(const char *name){
|
||||
struct passwd *pwd = (struct passwd *) calloc(1, sizeof(struct passwd));
|
||||
pwd->pw_uid = 1;
|
||||
|
|
Loading…
Reference in New Issue