v9fs/client.c:fix in x86 qemu crash

Summary:
  In the x86 environment, memory does not necessarily start at 0, so when end is 0x0, start = end + 1, and then determine the contents of start, it will cause x86 to cause a crash when accessing an illegal address.
This problem does not occur in the arm environment because arm starts at 0x0, so the content of the 0x1 address is “\0”.

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
This commit is contained in:
chenrun1 2024-08-15 16:04:07 +08:00 committed by Alan Carvalho de Assis
parent 1e3e551a19
commit a7f5c37a63

View File

@ -1555,6 +1555,7 @@ int v9fs_client_walk(FAR struct v9fs_client_s *client, FAR const char *path,
}
name_len = strlen(start);
end = start + name_len - 1;
}
else
{