* [PATCH] purgatory: Fix memcmp for src address increment
@ 2015-04-23 3:04 Pratyush Anand
2015-04-23 4:46 ` Simon Horman
0 siblings, 1 reply; 2+ messages in thread
From: Pratyush Anand @ 2015-04-23 3:04 UTC (permalink / raw)
To: horms; +Cc: geoff, Pratyush Anand, kexec
src addresses are not being incremented, so only first byte is compared
instead of first len bytes.
Signed-off-by: Pratyush Anand <panand@redhat.com>
Acked-by: Geoff Levand <geoff@infradead.org>
---
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;
--
2.1.0
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] purgatory: Fix memcmp for src address increment
2015-04-23 3:04 [PATCH] purgatory: Fix memcmp for src address increment Pratyush Anand
@ 2015-04-23 4:46 ` Simon Horman
0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2015-04-23 4:46 UTC (permalink / raw)
To: Pratyush Anand; +Cc: geoff, kexec
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@redhat.com>
> Acked-by: Geoff Levand <geoff@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;
>
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-23 4:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-23 3:04 [PATCH] purgatory: Fix memcmp for src address increment Pratyush Anand
2015-04-23 4:46 ` Simon Horman
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.