diff options
author | Robert James Kaes <rjkaes@users.sourceforge.net> | 2001-12-17 00:00:24 +0000 |
---|---|---|
committer | Robert James Kaes <rjkaes@users.sourceforge.net> | 2001-12-17 00:00:24 +0000 |
commit | fdb4952e5f2db8d245e1be501848282835885701 (patch) | |
tree | d6e21be8cd2ef2e6180bfc84412b897debbe3a47 | |
parent | 6919faea77c5f3614123c873641fcda011ef9c84 (diff) | |
download | tinyproxy-fdb4952e5f2db8d245e1be501848282835885701.tar.gz tinyproxy-fdb4952e5f2db8d245e1be501848282835885701.zip |
Added the assert() calls to safe_write() to make sure the arguments are
sane.
Diffstat (limited to '')
-rw-r--r-- | src/sock.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: sock.c,v 1.20 2001-12-15 20:04:04 rjkaes Exp $ +/* $Id: sock.c,v 1.21 2001-12-17 00:00:24 rjkaes Exp $ * * Sockets are created and destroyed here. When a new connection comes in from * a client, we need to copy the socket and the create a second socket to the @@ -279,6 +279,10 @@ safe_write(int fd, const char *buffer, size_t count) ssize_t len; size_t bytestosend; + assert(fd >= 0); + assert(buffer != NULL); + assert(count > 0); + bytestosend = count; while (1) { |