diff options
author | Volker Lendecke <vlendec@samba.org> | 2007-04-01 13:50:02 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:19:02 -0500 |
commit | 074c1eb0ea84ec5d9ebb95f5604d8b0acee7d4ec (patch) | |
tree | f903bcf230db0f442c32be497776c9e70f34cb84 /source3/lib | |
parent | 01efa3d40392be1f17398f8b713f45f410e265e7 (diff) | |
download | samba-074c1eb0ea84ec5d9ebb95f5604d8b0acee7d4ec.tar.gz samba-074c1eb0ea84ec5d9ebb95f5604d8b0acee7d4ec.tar.bz2 samba-074c1eb0ea84ec5d9ebb95f5604d8b0acee7d4ec.zip |
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)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/util.c | 4 |
1 files 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; } |