[PATCH] purgatory: Fix memcmp for src address increment

Simon Horman horms at verge.net.au
Wed Apr 22 21:46:14 PDT 2015


On Thu, Apr 23, 2015 at 08:34:17AM +0530, Pratyush Anand wrote:
> src addresses are not being incremented, so only first byte is compared
> instead of first len bytes.
> 
> Signed-off-by: Pratyush Anand <panand at redhat.com>
> Acked-by: Geoff Levand <geoff at infradead.org>

Thanks, applied.

> ---
>  purgatory/string.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/purgatory/string.c b/purgatory/string.c
> index 4f35613ef751..f06c460b08f8 100644
> --- a/purgatory/string.c
> +++ b/purgatory/string.c
> @@ -46,6 +46,8 @@ int memcmp(void *src1, void *src2, size_t len)
>  		if (*s1 != *s2) {
>  			return *s2 - *s1;
>  		}
> +		s1++;
> +		s2++;
>  	}
>  	return 0;
>  	



More information about the kexec mailing list