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 <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This commit is contained in:
X512 2023-11-12 14:42:29 +09:00 committed by Adrien Destugues
parent 0eb78d0928
commit f866c78257

View File

@ -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,