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> --- 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