Skip to content

Commit 70623cd

Browse files
committed
vmpu: Include the terminating-null in the bytes copied count
Previously, vmpu_box_namespace_from_id would not include the terminating-null in the bytes copied count it would return. We now include the terminating-null in the bytes copied count.
1 parent f367f43 commit 70623cd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

core/system/src/mpu/vmpu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,7 @@ static int copy_box_namespace(const char *src, char *dst)
444444

445445
if (src[bytes_copied] == '\0') {
446446
/* We've reached the end of the box namespace. */
447+
++bytes_copied; /* Include the terminating-null in bytes_copied. */
447448
goto done;
448449
}
449450
}

0 commit comments

Comments
 (0)