hwtracing: coresight: Fix potentioal buffer overflow

Change-Id: I7aaba80fbbf85d355c9383a9be1f423bd91c3aa6
This commit is contained in:
Arian
2023-09-22 14:05:19 +02:00
parent c55129b6ec
commit 608f695279

View File

@@ -423,7 +423,7 @@ static ssize_t out_mode_store(struct device *dev,
if (strlen(buf) >= 10)
return -EINVAL;
if (sscanf(buf, "%10s", str) != 1)
if (sscanf(buf, "%9s", str) != 1)
return -EINVAL;
ret = tmc_etr_switch_mode(drvdata, str);