Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fdfe840e authored by One Thousand Gnomes's avatar One Thousand Gnomes Committed by Rafael J. Wysocki
Browse files

cpupower: Fix sscanf robustness in cpufreq-set



The cpufreq-set tool has a missing length check. This is basically
just correctness but still should get fixed.

One of a set of sscanf problems reported by Jackie Chang

Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
[rjw: Subject]
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 319e2e3f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -257,7 +257,7 @@ int cmd_freq_set(int argc, char **argv)
				print_unknown_arg();
				return -EINVAL;
			}
			if ((sscanf(optarg, "%s", gov)) != 1) {
			if ((sscanf(optarg, "%19s", gov)) != 1) {
				print_unknown_arg();
				return -EINVAL;
			}