6035b15ee1
- fixes two memory leaks, one serious - quite some filter changes, upgraders beware! - for details, see http://www.privoxy.org/announce.txt from MAINTAINER
31 lines
1.1 KiB
Plaintext
31 lines
1.1 KiB
Plaintext
$OpenBSD: patch-loadcfg_c,v 1.2 2003/04/01 20:52:59 sturm Exp $
|
|
--- loadcfg.c.orig Tue Mar 11 06:53:59 2003
|
|
+++ loadcfg.c Sat Mar 29 18:17:03 2003
|
|
@@ -633,7 +633,7 @@ struct configuration_spec * load_config(
|
|
int vec_count;
|
|
char *vec[3];
|
|
|
|
- strcpy(tmp, buf);
|
|
+ strlcpy(tmp, buf, sizeof(tmp));
|
|
|
|
/* Copy command (i.e. up to space or tab) into cmd */
|
|
p = buf;
|
|
@@ -651,7 +651,7 @@ struct configuration_spec * load_config(
|
|
}
|
|
|
|
/* Copy the argument into arg */
|
|
- strcpy(arg, p);
|
|
+ strlcpy(arg, p, sizeof(arg));
|
|
|
|
/* Should never happen, but check this anyway */
|
|
if (*cmd == '\0')
|
|
@@ -1281,7 +1281,7 @@ struct configuration_spec * load_config(
|
|
* log-font-name fontnane
|
|
* *************************************************************************/
|
|
case hash_log_font_name :
|
|
- strcpy( g_szFontFaceName, arg );
|
|
+ strlcpy( g_szFontFaceName, arg , sizeof(g_szFontFaceName));
|
|
continue;
|
|
|
|
/* *************************************************************************
|