Re: [U-Boot] [PATCH 1/2] patman: Convert byte arrays to strings

2017-04-13 Thread Simon Glass
On 31 March 2017 at 22:23, Simon Glass  wrote:
> On 30 March 2017 at 08:44, George McCollister
>  wrote:
>> os.read() returns a byte array in Python 3.5.2 and needs to be converted
>> into a string. Check if the returned value is an instance of bytes and
>> if it is decode it as a utf-8 string. If it is not a utf-8 encoded string
>> the decoding may fail with an exception.
>>
>> Prior to this fix the comparisions check data == "" would fail when data
>> was b'' and would cause an infinite memory leaking loop. joins would
>> also fail with an exception below but due to the infinite loop it never
>> made it that far.
>>
>> Signed-off-by: George McCollister 
>> ---
>>  tools/patman/cros_subprocess.py | 4 
>>  1 file changed, 4 insertions(+)
>
> Acked-by: Simon Glass 


Applied to u-boot-dm, thanks!
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [PATCH 1/2] patman: Convert byte arrays to strings

2017-03-31 Thread Simon Glass
On 30 March 2017 at 08:44, George McCollister
 wrote:
> os.read() returns a byte array in Python 3.5.2 and needs to be converted
> into a string. Check if the returned value is an instance of bytes and
> if it is decode it as a utf-8 string. If it is not a utf-8 encoded string
> the decoding may fail with an exception.
>
> Prior to this fix the comparisions check data == "" would fail when data
> was b'' and would cause an infinite memory leaking loop. joins would
> also fail with an exception below but due to the infinite loop it never
> made it that far.
>
> Signed-off-by: George McCollister 
> ---
>  tools/patman/cros_subprocess.py | 4 
>  1 file changed, 4 insertions(+)

Acked-by: Simon Glass 
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot