[PATCH] purgatory: Fix memcmp for src address increment

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux