Unverified Commit 6c2b20b4 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!15389 orangefs: fix a oob in orangefs_debug_write

parents bc79b881 05c51a5c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -393,9 +393,9 @@ static ssize_t orangefs_debug_write(struct file *file,
	 * Thwart users who try to jamb a ridiculous number
	 * of bytes into the debug file...
	 */
	if (count > ORANGEFS_MAX_DEBUG_STRING_LEN + 1) {
	if (count > ORANGEFS_MAX_DEBUG_STRING_LEN) {
		silly = count;
		count = ORANGEFS_MAX_DEBUG_STRING_LEN + 1;
		count = ORANGEFS_MAX_DEBUG_STRING_LEN;
	}

	buf = kzalloc(ORANGEFS_MAX_DEBUG_STRING_LEN, GFP_KERNEL);