Re: [PATCH] tools: kwboot: Fix quitting terminal

2022-03-04 Thread Stefan Roese
On 2/18/22 12:24, Pali Rohár wrote: Sometimes kwboot after quitting terminal prints error message: terminal: Bad address This is caused by trying to call write() syscall with count of (size_t)-1 bytes. When quit sequence is split into more read() calls then number of input bytes (nin) at th

Re: [PATCH] tools: kwboot: Fix quitting terminal

2022-02-18 Thread Stefan Roese
On 2/18/22 12:24, Pali Rohár wrote: Sometimes kwboot after quitting terminal prints error message: terminal: Bad address This is caused by trying to call write() syscall with count of (size_t)-1 bytes. When quit sequence is split into more read() calls then number of input bytes (nin) at th

[PATCH] tools: kwboot: Fix quitting terminal

2022-02-18 Thread Pali Rohár
Sometimes kwboot after quitting terminal prints error message: terminal: Bad address This is caused by trying to call write() syscall with count of (size_t)-1 bytes. When quit sequence is split into more read() calls then number of input bytes (nin) at the end of cycle can underflow and be neg