From 074c1eb0ea84ec5d9ebb95f5604d8b0acee7d4ec Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sun, 1 Apr 2007 13:50:02 +0000 Subject: r22019: Jeremy, this hopefully fixes the build farm currently. But I think we need another get_safe_offset call that also includes the required buffer size. Volker (This used to be commit 6138be7e4a5eb57af4a024d749cb68168b8589fb) --- source3/lib/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source3/lib/util.c b/source3/lib/util.c index 809071662d..b74c08991a 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -3132,7 +3132,7 @@ int this_is_smp(void) char *get_safe_offset(const char *buf_base, size_t buf_len, char *ptr, size_t off) { const char *end_base = buf_base + buf_len; - const char *end_ptr = ptr + off; + char *end_ptr = ptr + off; if (!buf_base || !ptr) { return NULL; @@ -3143,7 +3143,7 @@ char *get_safe_offset(const char *buf_base, size_t buf_len, char *ptr, size_t of } if (end_ptr < end_base) { - return ptr; + return end_ptr; } return NULL; } -- cgit