s3:include: implement trans_oob() as wrapper to smb_buffer_oob()
[samba.git] / source3 / lib / util.c
index 8157c0ffd0d2c6005bde8f3d6d050931d8fc206b..f547ec2a5649e9b1f75ba80d5aec27fac3008950 100644 (file)
@@ -2015,25 +2015,6 @@ bool procid_is_local(const struct server_id *pid)
        return pid->vnn == my_vnn;
 }
 
-/****************************************************************
- 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