Commit 3c34471
platform/x86: dell-wmi-sysman: bound enumeration string aggregation
populate_enum_data() aggregates firmware-provided value-modifier
and possible-value strings into fixed 512-byte struct members.
The current code bounds each individual source string but then
appends every string and separator with raw strcat() and no
remaining-space check.
Switch the aggregation loops to a bounded append helper and
reject enumeration packages whose combined strings do not fit
in the destination buffers.
Fixes: e8a60aa ("platform/x86: Introduce support for Systems Management Driver over WMI for Dell Systems")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Link: https://patch.msgid.link/20260408084501.1-dell-wmi-sysman-v2-pengpeng@iscas.ac.cn
[ij: add include]
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>1 parent e8c5973 commit 3c34471
1 file changed
Lines changed: 28 additions & 6 deletions
Lines changed: 28 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
12 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
13 | 35 | | |
14 | 36 | | |
15 | 37 | | |
| |||
176 | 198 | | |
177 | 199 | | |
178 | 200 | | |
179 | | - | |
180 | | - | |
181 | | - | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
182 | 204 | | |
183 | 205 | | |
184 | 206 | | |
| |||
193 | 215 | | |
194 | 216 | | |
195 | 217 | | |
196 | | - | |
197 | | - | |
198 | | - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
199 | 221 | | |
200 | 222 | | |
201 | 223 | | |
| |||
0 commit comments