Commit df8c0b8
USB: serial: garmin_gps: use struct_size() to allocate pkt
Use the struct_size macro to calculate the size of the pkt, which
includes a trailing flexible array.
Suggested-by: Nathan Chancellor <[email protected]>
Signed-off-by: Javier Carrasco <[email protected]>
Reviewed-by: Gustavo A. R. Silva <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Signed-off-by: Johan Hovold <[email protected]>1 parent 55a15b3 commit df8c0b8
1 file changed
+1
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
271 | | - | |
| 270 | + | |
272 | 271 | | |
273 | 272 | | |
274 | 273 | | |
| |||
0 commit comments