Re: [PATCH] autoboot: fix illegal memory access when stop key and delay key are empty

2021-01-28 Thread Tom Rini
On Fri, Jan 15, 2021 at 03:11:49AM +, yuezhang...@sony.com wrote: > If both stop key and delay key are empty, the length of these > keys is 0. The subtraction operation will cause the u_int type > variable to overflow, will cause illegal memory access in key > input loop. > > This commit fixe

Re: [PATCH] autoboot: fix illegal memory access when stop key and delay key are empty

2021-01-17 Thread Heinrich Schuchardt
e. Best regards Heinrich Best Regards Andy Wu -Original Message- From: U-Boot On Behalf Of Heinrich Schuchardt Sent: Friday, January 15, 2021 8:19 PM To: Mo, Yuezhang ; u-boot@lists.denx.de Cc: s...@chromium.org; h...@denx.de Subject: Re: [PATCH] autoboot: fix illegal memory access

RE: [PATCH] autoboot: fix illegal memory access when stop key and delay key are empty

2021-01-17 Thread Andy.Wu
t; presskey_max; i++) > This style seems not typically way for for loop, how do you think? > > Best Regards > Andy Wu > > > -Original Message----- > > From: U-Boot On Behalf Of Heinrich > > Schuchardt > > Sent: Friday, January 15, 2021 8:19 PM > > To:

RE: [PATCH] autoboot: fix illegal memory access when stop key and delay key are empty

2021-01-17 Thread Andy.Wu
hromium.org; h...@denx.de > Subject: Re: [PATCH] autoboot: fix illegal memory access when stop key and > delay key are empty > > On 15.01.21 04:11, yuezhang...@sony.com wrote: > > If both stop key and delay key are empty, the length of these keys is > > 0. The subtraction operatio

Re: [PATCH] autoboot: fix illegal memory access when stop key and delay key are empty

2021-01-15 Thread Heinrich Schuchardt
On 15.01.21 04:11, yuezhang...@sony.com wrote: > If both stop key and delay key are empty, the length of these > keys is 0. The subtraction operation will cause the u_int type > variable to overflow, will cause illegal memory access in key > input loop. > > This commit fixes this bug by using int t

[PATCH] autoboot: fix illegal memory access when stop key and delay key are empty

2021-01-14 Thread Yuezhang.Mo
If both stop key and delay key are empty, the length of these keys is 0. The subtraction operation will cause the u_int type variable to overflow, will cause illegal memory access in key input loop. This commit fixes this bug by using int type instead of u_init. --- common/autoboot.c | 6 +++---