Commit c996260
thermal: core: prevent potential string overflow
The dev->id value comes from ida_alloc() so it's a number between zero
and INT_MAX. If it's too high then these sprintf()s will overflow.
Fixes: 203d3d4 ("the generic thermal sysfs driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>1 parent e17ea8a commit c996260
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
681 | 681 | | |
682 | 682 | | |
683 | 683 | | |
684 | | - | |
| 684 | + | |
| 685 | + | |
685 | 686 | | |
686 | 687 | | |
687 | 688 | | |
| |||
690 | 691 | | |
691 | 692 | | |
692 | 693 | | |
693 | | - | |
| 694 | + | |
| 695 | + | |
694 | 696 | | |
695 | 697 | | |
696 | 698 | | |
| |||
0 commit comments