On 6/23/22 1:43 PM, yla...@apache.org wrote:
> Author: ylavic
> Date: Thu Jun 23 11:43:05 2022
> New Revision: 1902196
> 
> URL: http://svn.apache.org/viewvc?rev=1902196&view=rev
> Log:
> apr_json_decode: apr_array_header_t uses ints.
> 
> * json/apr_json_decode.c(apr_json_decode_array):
>   apr_array_make() want an int.
> 
> 
> Modified:
>     apr/apr/trunk/json/apr_json_decode.c
> 
> Modified: apr/apr/trunk/json/apr_json_decode.c
> URL: 
> http://svn.apache.org/viewvc/apr/apr/trunk/json/apr_json_decode.c?rev=1902196&r1=1902195&r2=1902196&view=diff
> ==============================================================================
> --- apr/apr/trunk/json/apr_json_decode.c (original)
> +++ apr/apr/trunk/json/apr_json_decode.c Thu Jun 23 11:43:05 2022
> @@ -353,7 +353,7 @@ static apr_status_t apr_json_decode_arra
>          apr_json_value_t * array)
>  {
>      apr_status_t status = APR_SUCCESS;
> -    apr_size_t count = 0;
> +    int count = 0;

Wouldn't we need to guard against overflow then?

>  
>      if (self->p >= self->e) {
>          return APR_EOF;

Regards

RĂ¼diger

Reply via email to