From 6b446cba67a41ee1444835cd4469080e4e7985f4 Mon Sep 17 00:00:00 2001 From: Xie XiuQi Date: Wed, 31 Dec 2014 11:07:38 +0800 Subject: [PATCH] create-diff-object: fix a potential overflow for rela type rela.type should be unsigned int instead of unsighed char. /usr/include/gelf.h:#define GELF_R_TYPE(info) ELF64_R_TYPE (info) /usr/include/elf.h:#define ELF64_R_TYPE(i) ((i) & 0xffffffff) Signed-off-by: Xie XiuQi --- kpatch-build/create-diff-object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kpatch-build/create-diff-object.c b/kpatch-build/create-diff-object.c index a16fa49..a93bb66 100644 --- a/kpatch-build/create-diff-object.c +++ b/kpatch-build/create-diff-object.c @@ -133,7 +133,7 @@ struct rela { struct list_head list; GElf_Rela rela; struct symbol *sym; - unsigned char type; + unsigned int type; int addend; int offset; char *string;