diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2022-07-25 10:37:54 -0700 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2022-08-03 19:28:46 +0200 |
commit | 6c58cf40e3a1d2f47c09d3489857e9476316788a (patch) | |
tree | 496c2f78e814e0510f1cc4c09b97533217c562ea /tools/spi/Makefile | |
parent | c1dbe9a1c86da098a29dcdca1a67b65e2de7ec3a (diff) | |
download | linux-6c58cf40e3a1d2f47c09d3489857e9476316788a.tar.bz2 |
tools/thermal: Fix possible path truncations
A build with -D_FORTIFY_SOURCE=2 enabled will produce the following warnings:
sysfs.c:63:30: warning: '%s' directive output may be truncated writing up to 255 bytes into a region of size between 0 and 255 [-Wformat-truncation=]
snprintf(filepath, 256, "%s/%s", path, filename);
^~
Bump up the buffer to PATH_MAX which is the limit and account for all of
the possible NUL and separators that could lead to exceeding the
allocated buffer sizes.
Fixes: 94f69966faf8 ("tools/thermal: Introduce tmon, a tool for thermal subsystem")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools/spi/Makefile')
0 files changed, 0 insertions, 0 deletions