From f866c78257f5911c7487c48773eec7d4ac3ebf31 Mon Sep 17 00:00:00 2001 From: X512 Date: Sun, 12 Nov 2023 14:42:29 +0900 Subject: [PATCH] poke: fix setting area name in POKE_MAP_MEMORY ioctl Fix regression caused hrev52304 Change-Id: Ibadaed3a098d33787c18f243c55c546ff8c2d03b Reviewed-on: https://review.haiku-os.org/c/haiku/+/7099 Reviewed-by: Adrien Destugues Tested-by: Commit checker robot --- src/add-ons/kernel/drivers/misc/poke.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/add-ons/kernel/drivers/misc/poke.cpp b/src/add-ons/kernel/drivers/misc/poke.cpp index bfbcfaefe7..7f683cc0a9 100644 --- a/src/add-ons/kernel/drivers/misc/poke.cpp +++ b/src/add-ons/kernel/drivers/misc/poke.cpp @@ -301,7 +301,7 @@ poke_control(void* cookie, uint32 op, void* arg, size_t length) return B_BAD_VALUE; char name[B_OS_NAME_LENGTH]; - if (user_strlcpy(name, ioctl.name, B_OS_NAME_LENGTH) != B_OK) + if (user_strlcpy(name, ioctl.name, B_OS_NAME_LENGTH) < B_OK) return B_BAD_ADDRESS; ioctl.area = map_physical_memory(name,