[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Fix integer overflow in svn_auth.h

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2003-10-25 08:19:12 CEST

On Fri, 2003-10-24 at 19:57, Justin Erenkrantz wrote:
> "../../subversion/subversion/libsvn_ra_dav/session.c", line 138: warning:
> integer overflow detected: op "<<" (E_INTEGER_OVERFLOW_DETECTED)

By my reading, if we want to use 1 << 31, we need to cast the 1 to
unsigned apr_uint32_t, and hold the status in an apr_uint32_t instead of
an int. That also has implications for ssl_server_trust_providers.c and
possibly other code. It's a lot more work to fix this up, but we really
shouldn't be using a signed type for bit containers even if we aren't
using 1<<31; it's cleaner to use an unsigned type.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 25 08:19:54 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.