[Pdbg] [PATCH] sbefifo: Memory size for sbefifo ops must be 4-byte aligned

Alistair Popple alistair at popple.id.au
Fri Aug 2 14:01:40 AEST 2019


Reviewed-by: Alistair Popple <alistair at popple.id.au>

On Friday, 2 August 2019 12:26:17 PM AEST Amitay Isaacs wrote:
> Signed-off-by: Amitay Isaacs <amitay at ozlabs.org>
> ---
>  libpdbg/sbefifo.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libpdbg/sbefifo.c b/libpdbg/sbefifo.c
> index a2442cd..c251089 100644
> --- a/libpdbg/sbefifo.c
> +++ b/libpdbg/sbefifo.c
> @@ -146,7 +146,7 @@ static int sbefifo_op(struct sbefifo *sbefifo,
>  	 * Allocate extra memory for FFDC (SBEFIFO_MAX_FFDC_SIZE = 0x2000)
>  	 * Use *out_len as a hint to expected reply length
>  	 */
> -	buflen = *out_len + 0x2000 ;
> +	buflen = (*out_len + 0x2000 + 3) & (uint32_t)~3;
>  	buf = malloc(buflen);
>  	assert(buf);
>  
> 






More information about the Pdbg mailing list