From 3ec3e1a7f6e810b10862ffc329795217a04f4aec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Gardou?= Date: Fri, 4 Dec 2020 15:44:11 +0100 Subject: [PATCH] [BTRFS] Fix wrong condition check --- drivers/filesystems/btrfs/security.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/filesystems/btrfs/security.c b/drivers/filesystems/btrfs/security.c index 7f429e27274..f6769d05606 100644 --- a/drivers/filesystems/btrfs/security.c +++ b/drivers/filesystems/btrfs/security.c @@ -180,7 +180,7 @@ void add_group_mapping(WCHAR* sidstring, ULONG sidstringlength, uint32_t gid) { while (sidstringlength > 0) { val = 0; i = 0; - while (sidstring[i] != '-' && i < sidstringlength) { + while (i < sidstringlength && sidstring[i] != '-') { if (sidstring[i] >= '0' && sidstring[i] <= '9') { val *= 10; val += sidstring[i] - '0';