diff options
| author | Viresh Kumar <viresh.kumar@linaro.org> | 2016-01-05 16:15:54 +0530 |
|---|---|---|
| committer | Alex Shi <alex.shi@linaro.org> | 2016-04-08 11:22:26 +0800 |
| commit | 59dfbb981e645f30e53a32222dd3bd478b242496 (patch) | |
| tree | 672c3ef171c105e90a94aec261cf41dbadf9773e /include/linux/debugobjects.h | |
| parent | cb8acf6df06ef9b4a708d34e169b420e52d0c941 (diff) | |
PM / OPP: Use snprintf() instead of sprintf()
sprintf() can access memory outside of the range of the character array,
and is risky in some situations. The driver specified prop_name string
can be longer than NAME_MAX here (only an attacker will do that though)
and so blindly copying it into the character array of size NAME_MAX
isn't safe. Instead we must use snprintf() here.
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 5ff24d601092b222340b28466e263b1c4559407e)
Signed-off-by: Alex Shi <alex.shi@linaro.org>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
