Re: [PATCH v4 07/53] semihosting: Simplify softmmu_lock_user_string

2022-06-08 Thread Alex Bennée
Richard Henderson writes: > We are not currently bounding the search to the 1024 bytes > that we allocated, possibly overrunning the buffer. > Use softmmu_strlen_user to find the length and allocate the > correct size from the beginning. > > Reviewed-by: Peter Maydell > Signed-off-by: Richard

[PATCH v4 07/53] semihosting: Simplify softmmu_lock_user_string

2022-06-07 Thread Richard Henderson
We are not currently bounding the search to the 1024 bytes that we allocated, possibly overrunning the buffer. Use softmmu_strlen_user to find the length and allocate the correct size from the beginning. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- semihosting/uaccess.c | 15