cifs-utils/0004-mount.cifs-fix-max-buffer-size-when-parsing-snapshot.patch
Zhiqiang Liu b9a4d50032 cifs-utils: backport some patches
Fix issue: https://gitee.com/src-openeuler/cifs-utils/issues/I6RRNJ

Signed-off-by: Zhiqiang Liu <liuzhiqiang26@huawei.com>
(cherry picked from commit 9305c08964d0f21e12f29fed187e53e5231770a2)
2023-03-31 11:18:24 +08:00

27 lines
736 B
Diff

From 7156c6eca0fcf3d4a2fd2f8677b2622475c5c46e Mon Sep 17 00:00:00 2001
From: Pavel Shilovsky <pshilov@microsoft.com>
Date: Wed, 9 Dec 2020 11:29:40 -0800
Subject: [PATCH] mount.cifs: fix max buffer size when parsing snapshot option
Signed-off-by: Pavel Shilovsky <pshilov@microsoft.com>
---
mount.cifs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mount.cifs.c b/mount.cifs.c
index ff07232..7c949cf 100644
--- a/mount.cifs.c
+++ b/mount.cifs.c
@@ -1292,7 +1292,7 @@ nocopy:
strlcat(out, ",", MAX_OPTIONS_LEN);
out_len++;
}
- snprintf(out + out_len, word_len + 11, "snapshot=%s", txtbuf);
+ snprintf(out + out_len, word_len + 10, "snapshot=%s", txtbuf);
out_len = strlen(out);
}
--
2.33.0