提交 7ef781c2 编写于 作者: M mucor

fix: fix long file name buffer overflow check at 254 length

close: #I43S7Z
Signed-off-by: Nmucor <mucorwang@gmail.com>
上级 c2484117
......@@ -1662,7 +1662,7 @@ static int pick_lfn ( /* 1:succeeded, 0:buffer overflow or invalid LFN entry */
}
if (dir[LDIR_Ord] & LLEF) { /* Put terminator if it is the last LFN part */
if (i >= FF_MAX_LFN) return 0; /* Buffer overflow? */
if (i > FF_MAX_LFN) return 0; /* Buffer overflow? */
lfnbuf[i] = 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册