[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen stable-4.8] fix out of bound access to mode_strings
commit b2e678e81dd9635eb33279e2817168d13b78c1fa Author: Stefano Stabellini <sstabellini@xxxxxxxxxx> AuthorDate: Thu Dec 8 17:17:04 2016 -0800 Commit: Stefano Stabellini <sstabellini@xxxxxxxxxx> CommitDate: Thu Mar 16 13:47:03 2017 -0700 fix out of bound access to mode_strings mode == ARRAY_SIZE(mode_strings) causes an out of bound access to the mode_strings array. Coverity-ID: 1381859 Signed-off-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> Reviewed-by: Julien Grall <julien.grall@xxxxxxx> --- xen/arch/arm/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index 7ab96d4..90aba2a 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -656,7 +656,7 @@ static const char *mode_string(uint32_t cpsr) }; mode = cpsr & PSR_MODE_MASK; - if ( mode > ARRAY_SIZE(mode_strings) ) + if ( mode >= ARRAY_SIZE(mode_strings) ) return "Unknown"; return mode_strings[mode] ? : "Unknown"; } -- generated by git-patchbot for /home/xen/git/xen.git#stable-4.8 _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |