Commit 146afeb
block: use strscpy() to instead of strncpy()
The implementation of strscpy() is more robust and safer.
That's now the recommended way to copy NUL terminated strings.
Signed-off-by: Xu Panda <xu.panda@zte.com.cn>
Signed-off-by: Yang Yang <yang.yang29@zte.com>
Reviewed-by: Justin Stitt <justinstitt@google.com>
Link: https://lore.kernel.org/r/202212031422587503771@zte.com.cn
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 3bfeb61 commit 146afeb
1 file changed
+4
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
85 | | - | |
| 84 | + | |
86 | 85 | | |
87 | 86 | | |
88 | 87 | | |
| |||
140 | 139 | | |
141 | 140 | | |
142 | 141 | | |
143 | | - | |
144 | | - | |
| 142 | + | |
145 | 143 | | |
146 | 144 | | |
147 | 145 | | |
| |||
153 | 151 | | |
154 | 152 | | |
155 | 153 | | |
156 | | - | |
157 | | - | |
| 154 | + | |
158 | 155 | | |
159 | 156 | | |
160 | 157 | | |
| |||
267 | 264 | | |
268 | 265 | | |
269 | 266 | | |
270 | | - | |
271 | | - | |
| 267 | + | |
272 | 268 | | |
273 | 269 | | |
274 | 270 | | |
| |||
0 commit comments