dnl
dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
dnl
-dnl $Id: configure.in,v 1.262 2002/04/13 14:11:43 hno Exp $
+dnl $Id: configure.in,v 1.263 2002/04/13 14:16:04 hno Exp $
dnl
dnl
dnl
AC_CONFIG_AUX_DIR(cfgaux)
AM_INIT_AUTOMAKE(squid, 2.6-DEVEL)
AM_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.262 $)dnl
+AC_REVISION($Revision: 1.263 $)dnl
AC_PREFIX_DEFAULT(/usr/local/squid)
AM_MAINTAINER_MODE
AC_CHECK_TYPE(mode_t, u_short)
AC_CHECK_TYPE(fd_mask, int)
+AC_CHECK_SIZEOF_SYSTYPE(off_t, 4)
+AC_CHECK_SIZEOF_SYSTYPE(size_t, 4)
+
dnl Check for special functions
AC_FUNC_ALLOCA
/*
- * $Id: client_side.cc,v 1.570 2002/04/11 22:05:53 hno Exp $
+ * $Id: client_side.cc,v 1.571 2002/04/13 14:16:04 hno Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
if (isTcpHit(http->log_type))
kb_incr(&statCounter.client_http.hit_kbytes_out, size);
}
+#if SIZEOF_SIZE_T == 4
+ if (http->out.size > 0x7FFF0000) {
+ debug(33, 1) ("WARNING: closing FD %d to prevent counter overflow\n", fd);
+ debug(33, 1) ("\tclient %s\n", inet_ntoa(http->conn->peer.sin_addr));
+ debug(33, 1) ("\treceived %d bytes\n", http->out.size);
+ debug(33, 1) ("\tURI %s\n", http->log_uri);
+ comm_close(fd);
+ } else
+#endif
+#if SIZEOF_OFF_T == 4
+ if (http->out.offset > 0x7FFF0000) {
+ debug(33, 1) ("WARNING: closing FD %d to prevent counter overflow\n", fd);
+ debug(33, 1) ("\tclient %s\n", inet_ntoa(http->conn->peer.sin_addr));
+ debug(33, 1) ("\treceived %d bytes (offset %d)\n", http->out.size,
+ http->out.offset);
+ debug(33, 1) ("\tURI %s\n", http->log_uri);
+ comm_close(fd);
+ } else
+#endif
if (errflag) {
/*
* just close the socket, httpRequestFree will abort if needed
/*
- * $Id: store_swapout.cc,v 1.85 2001/12/17 20:20:43 hno Exp $
+ * $Id: store_swapout.cc,v 1.86 2002/04/13 14:16:04 hno Exp $
*
* DEBUG: section 20 Storage Manager Swapout Functions
* AUTHOR: Duane Wessels
}
stmemFreeDataUpto(&mem->data_hdr, new_mem_lo);
mem->inmem_lo = new_mem_lo;
+#if SIZEOF_OFF_T == 4
+ if (mem->inmem_hi > 0x7FFF0000) {
+ debug(20, 0) ("WARNING: preventing off_t overflow for %s\n", storeUrl(e));
+ storeAbort(e);
+ return;
+ }
+#endif
if (e->swap_status == SWAPOUT_WRITING)
assert(mem->inmem_lo <= on_disk);
if (!storeSwapOutAble(e))