diff options
author | Günther Deschner <gd@samba.org> | 2010-08-13 15:12:29 +0200 |
---|---|---|
committer | Günther Deschner <gd@samba.org> | 2010-08-13 15:20:58 +0200 |
commit | bb8936c08709ea5e59eeba2f67359c7511fb89f0 (patch) | |
tree | 075b203815dbf3701a30b8c46f54d941abec1181 /source3 | |
parent | 71d80e6be0687ac7c2f3caab5e7b8caf400fe37e (diff) | |
download | samba-bb8936c08709ea5e59eeba2f67359c7511fb89f0.tar.gz samba-bb8936c08709ea5e59eeba2f67359c7511fb89f0.tar.bz2 samba-bb8936c08709ea5e59eeba2f67359c7511fb89f0.zip |
s3-dcerpc: fix build warning seen with -O3.
"warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false"
Guenther
Diffstat (limited to 'source3')
-rw-r--r-- | source3/librpc/rpc/dcerpc_helpers.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/librpc/rpc/dcerpc_helpers.c b/source3/librpc/rpc/dcerpc_helpers.c index 84f7ce4c82..f8ca8e6276 100644 --- a/source3/librpc/rpc/dcerpc_helpers.c +++ b/source3/librpc/rpc/dcerpc_helpers.c @@ -898,9 +898,9 @@ NTSTATUS dcerpc_check_auth(struct pipe_auth_data *auth, if (pkt->auth_length > pkt->frag_length) { return NT_STATUS_INFO_LENGTH_MISMATCH; } - if ((pkt->auth_length - + DCERPC_AUTH_TRAILER_LENGTH < pkt->auth_length) || - (pkt->auth_length + if (((unsigned int)pkt->auth_length + + DCERPC_AUTH_TRAILER_LENGTH < (unsigned int)pkt->auth_length) || + ((unsigned int)pkt->auth_length + DCERPC_AUTH_TRAILER_LENGTH < DCERPC_AUTH_TRAILER_LENGTH)) { /* Integer wrap attempt. */ return NT_STATUS_INFO_LENGTH_MISMATCH; |