diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-05-11 06:38:36 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-05-11 06:38:36 +0000 |
commit | ee09e9dadb69aaba5a751dd20ccc6d587d841bd6 (patch) | |
tree | b7d08dcf7d06d74c7bba90655f720c14cff8981a /source/lib/util_hnd.c | |
parent | 6b0c1733d2ebf3b8f09f3bf88b8648d8b371bb1f (diff) | |
download | samba-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/util_hnd.c')
-rw-r--r-- | source/lib/util_hnd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/lib/util_hnd.c b/source/lib/util_hnd.c index c8eabf35b41..1d1341d16e3 100644 --- a/source/lib/util_hnd.c +++ b/source/lib/util_hnd.c @@ -115,7 +115,7 @@ BOOL open_lsa_policy_hnd(POLICY_HND *hnd) memcpy(&(Policy[i].pol_hnd), hnd, sizeof(*hnd)); DEBUG(4,("Opened policy hnd[%x] ", i)); - dump_data(4, hnd->data, sizeof(hnd->data)); + dump_data(4, (char *)hnd->data, sizeof(hnd->data)); return True; } @@ -143,14 +143,14 @@ int find_lsa_policy_by_hnd(POLICY_HND *hnd) if (memcmp(&(Policy[i].pol_hnd), hnd, sizeof(*hnd)) == 0) { DEBUG(4,("Found policy hnd[%x] ", i)); - dump_data(4, hnd->data, sizeof(hnd->data)); + dump_data(4, (char *)hnd->data, sizeof(hnd->data)); return i; } } DEBUG(4,("Policy not found: ")); - dump_data(4, hnd->data, sizeof(hnd->data)); + dump_data(4, (char *)hnd->data, sizeof(hnd->data)); return -1; } |