f708b4a252
From Moritz Grimm <gtgbr@gmx.net> (MAINTAINER)
20 lines
755 B
Plaintext
20 lines
755 B
Plaintext
$OpenBSD: patch-src_setup_c,v 1.1 2005/05/21 13:46:44 alek Exp $
|
|
--- src/setup.c.orig Sat Jul 31 11:13:35 2004
|
|
+++ src/setup.c Fri May 20 13:48:53 2005
|
|
@@ -264,7 +264,14 @@ ices_setup_parse_config_file (ices_confi
|
|
if (ices_util_verify_file (configfile)) {
|
|
realname = configfile;
|
|
} else {
|
|
- sprintf (namespace, "%s/%s", ICES_ETCDIR, configfile);
|
|
+ int sret;
|
|
+ size_t size;
|
|
+ size = sizeof (namespace);
|
|
+ sret = snprintf (namespace, size, "%s/%s", ICES_ETCDIR, configfile);
|
|
+ if (sret == -1 || sret >= size) {
|
|
+ ices_log ("WARNING: Truncation or format/encoding error occured in ices_setup_parse_config_file()");
|
|
+ return;
|
|
+ }
|
|
if (ices_util_verify_file (namespace))
|
|
realname = &namespace[0];
|
|
}
|