/[Apache-SVN]
ViewVC logotype

Revision 1904728


Jump to revision: Previous Next
Author: ylavic
Date: Thu Oct 20 09:38:34 2022 UTC (2 years, 1 month ago)
Changed paths: 2
Log Message:
apr_base64: Make sure encoding/decoding lengths fit in an int >= 0.

The (old) API of apr_base64 functions has always used int for representing
lengths and it does not return errors. Make sure to abort() if the provided
data don't fit.

* encoding/apr_base64.c():
  #define APR_BASE64_ENCODE_MAX and APR_BASE64_DECODE_MAX as the hard length
  limits for encoding and decoding respectively.

* encoding/apr_base64.c(apr_base64_encode_len, apr_base64_encode,
                        apr_base64_encode_binary, apr_pbase64_encode):
  abort() if the given length is above APR_BASE64_ENCODE_MAX.

* encoding/apr_base64.c(apr_base64_decode_len, apr_base64_decode,
                        apr_base64_decode_binary, apr_pbase64_decode):
  abort() if the given plain buffer length is above APR_BASE64_DECODE_MAX.


apr_base64: Follow up to r1902206: Cap to APR_BASE64_ENCODE_MAX in apr_pbase64_encode().


Merges r1902206[, r1904666] from trunk.
Merges r1904727 from 1.7.x.


Changed paths

Path Details
Directoryapr/apr-util/branches/1.6.x/ modified , props changed
Directoryapr/apr-util/branches/1.6.x/encoding/apr_base64.c modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26