-const char miscutil_rcs[] = "$Id: miscutil.c,v 1.77 2012/07/23 12:41:59 fabiankeil Exp $";
+const char miscutil_rcs[] = "$Id: miscutil.c,v 1.79 2015/08/12 10:34:38 fabiankeil Exp $";
/*********************************************************************
*
* File : $Source: /cvsroot/ijbswa/current/miscutil.c,v $
* to deserve their own file but don't really fit in
* any other file.
*
- * Copyright : Written by and Copyright (C) 2001-2012 the
+ * Copyright : Written by and Copyright (C) 2001-2016 the
* Privoxy team. http://www.privoxy.org/
*
* Based on the Internet Junkbuster originally written
{
char *new_buf;
+ if (buffer_size == 0)
+ {
+ log_error(LOG_LEVEL_ERROR,
+ "malloc_or_die() called with buffer size 0");
+ assert(buffer_size != 0);
+ buffer_size = 4096;
+ }
+
new_buf = malloc(buffer_size);
if (new_buf == NULL)