summaryrefslogtreecommitdiffstats
path: root/source/lib/system.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-05-11 06:38:36 +0000
committerAndrew Tridgell <tridge@samba.org>1998-05-11 06:38:36 +0000
commitee09e9dadb69aaba5a751dd20ccc6d587d841bd6 (patch)
treeb7d08dcf7d06d74c7bba90655f720c14cff8981a /source/lib/system.c
parent6b0c1733d2ebf3b8f09f3bf88b8648d8b371bb1f (diff)
downloadsamba-ee09e9dadb69aaba5a751dd20ccc6d587d841bd6.tar.gz
samba-ee09e9dadb69aaba5a751dd20ccc6d587d841bd6.tar.xz
samba-ee09e9dadb69aaba5a751dd20ccc6d587d841bd6.zip
changed to use slprintf() instead of sprintf() just about
everywhere. I've implemented slprintf() as a bounds checked sprintf() using mprotect() and a non-writeable page. This should prevent any sprintf based security holes.
Diffstat (limited to 'source/lib/system.c')
-rw-r--r--source/lib/system.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/lib/system.c b/source/lib/system.c
index 3eef8e5034c..f453741fdd0 100644
--- a/source/lib/system.c
+++ b/source/lib/system.c
@@ -411,7 +411,7 @@ struct hostent *sys_gethostbyname(char *name)
if((strlen(name) + strlen(domain)) >= sizeof(query))
return(gethostbyname(name));
- sprintf(query, "%s%s", name, domain);
+ slprintf(query, sizeof(query)-1, "%s%s", name, domain);
return(gethostbyname(query));
#else /* REDUCE_ROOT_DNS_LOOKUPS */
return(gethostbyname(name));