summaryrefslogtreecommitdiff
path: root/source3/lib/util.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-10-26 14:23:48 +0200
committerStefan Metzmacher <metze@samba.org>2011-10-26 15:33:30 +0200
commit7682f61e1003c6e43ba46013eb45248d676c4476 (patch)
tree96437606d79f0153d0ebbf60ac0306dc58ddc217 /source3/lib/util.c
parent5f520e771786d416d55c8d0a84e411c73fc5396c (diff)
downloadsamba-7682f61e1003c6e43ba46013eb45248d676c4476.tar.gz
samba-7682f61e1003c6e43ba46013eb45248d676c4476.tar.bz2
samba-7682f61e1003c6e43ba46013eb45248d676c4476.zip
s3:include: implement trans_oob() as wrapper to smb_buffer_oob()
metze
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r--source3/lib/util.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 8157c0ffd0..f547ec2a56 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -2016,25 +2016,6 @@ bool procid_is_local(const struct server_id *pid)
}
/****************************************************************
- Check if offset/length fit into bufsize. Should probably be
- merged with is_offset_safe, but this would require a rewrite
- of lanman.c. Later :-)
-****************************************************************/
-
-bool trans_oob(uint32_t bufsize, uint32_t offset, uint32_t length)
-{
- if ((offset + length < offset) || (offset + length < length)) {
- /* wrap */
- return true;
- }
- if ((offset > bufsize) || (offset + length > bufsize)) {
- /* overflow */
- return true;
- }
- return false;
-}
-
-/****************************************************************
Check if an offset into a buffer is safe.
If this returns True it's safe to indirect into the byte at
pointer ptr+off.