projects
/
privoxy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a --fuzz option
[privoxy.git]
/
jbsockets.c
diff --git
a/jbsockets.c
b/jbsockets.c
index
182382b
..
187fbc4
100644
(file)
--- a/
jbsockets.c
+++ b/
jbsockets.c
@@
-1,4
+1,4
@@
-const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.13
7 2016/08/22 14:50:18 fabiankeil
Exp $";
+const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.13
8 2016/09/27 22:48:28 ler762
Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jbsockets.c,v $
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/jbsockets.c,v $
@@
-594,6
+594,14
@@
int write_socket(jb_socket fd, const char *buf, size_t len)
return 0;
}
return 0;
}
+#ifdef FUZZ
+ if (!daemon_mode && fd <= 3)
+ {
+ log_error(LOG_LEVEL_WRITING, "Pretending to write to socket %d: %N", fd, len, buf);
+ return 0;
+ }
+#endif
+
log_error(LOG_LEVEL_WRITING, "to socket %d: %N", fd, len, buf);
#if defined(_WIN32)
log_error(LOG_LEVEL_WRITING, "to socket %d: %N", fd, len, buf);
#if defined(_WIN32)