Commit 3c4acb2
zwave_api: Harden zwapi_protocol_rx_dispatch.c by checking snprintf
Checking snprintf results, reminder :
If the output was truncated due to this limit, then the return
value is the number of characters (excluding the terminating
null byte) which would have been written to the final string if
enough space had been available
This was found using CodeQL:
Potential fix for code scanning alert no. 23:
Potentially overflowing call to snprintf
Relate-to: SiliconLabsSoftware#100
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Philippe Coval <philippe.coval@silabs.com>1 parent 370100c commit 3c4acb2
File tree
1 file changed
+17
-6
lines changed- applications/zpc/components/zwave_api/src
1 file changed
+17
-6
lines changedLines changed: 17 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
| 115 | + | |
114 | 116 | | |
115 | | - | |
| 117 | + | |
116 | 118 | | |
117 | | - | |
| 119 | + | |
118 | 120 | | |
119 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
120 | 127 | | |
121 | | - | |
122 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
123 | 134 | | |
124 | 135 | | |
125 | 136 | | |
| |||
650 | 661 | | |
651 | 662 | | |
652 | 663 | | |
653 | | - | |
| 664 | + | |
654 | 665 | | |
655 | 666 | | |
656 | 667 | | |
| |||
0 commit comments