Re: [PATCH] softmmu/physmem.c: Check return value from realpath()

2021-08-13 Thread Paolo Bonzini
On 12/08/21 17:15, Peter Maydell wrote: The realpath() function can return NULL on error, so we need to check for it to avoid crashing when we try to strstr() into it. This can happen if we run out of memory, or if /sys/ is not mounted, among other situations. Fixes: Coverity 1459913, 1460474 Fi

Re: [PATCH] softmmu/physmem.c: Check return value from realpath()

2021-08-13 Thread Liu, Jingqi
On 8/12/2021 11:15 PM, Peter Maydell wrote: The realpath() function can return NULL on error, so we need to check for it to avoid crashing when we try to strstr() into it. This can happen if we run out of memory, or if /sys/ is not mounted, among other situations. Fixes: Coverity 1459913, 1460

[PATCH] softmmu/physmem.c: Check return value from realpath()

2021-08-12 Thread Peter Maydell
The realpath() function can return NULL on error, so we need to check for it to avoid crashing when we try to strstr() into it. This can happen if we run out of memory, or if /sys/ is not mounted, among other situations. Fixes: Coverity 1459913, 1460474 Fixes: ce317be98db0 ("exec: fetch the alignm