https://issues.apache.org/bugzilla/show_bug.cgi?id=46508





--- Comment #4 from [email protected]  2009-01-11 07:32:11 PST ---
On reviewing your version of my patch more carefully - is apr_size_t guaranteed
to be signed?

I don't think it is.  So there's a potential signedness issue that may bite
some platforms.

UNSET is defined as -1.  DEFAULT_RENEG_BUFFER_SIZE is signed.  nRenegBufferSize
is an apr_size_t.  Not pretty.

I agree that apr_size_t is the right thing to use for the buffer size, but
there are certainly compilers where -1 can never == unsigned.

My version handwaved that by forcing a type conversion to int before the
comparison...it was the minimal change to the orginal code.

There are other approaches (such as casting UNSET to an apr_size_t) - a matter
of style.  (The other config variables that I noticed tended to use int in the
structures.)


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to