Commit d9923a1
lib/ynl: reject strings with 0 len in ynl_attr_validate()
Strings from kernel are always null terminated which is checked for but
it currently assumes that the len is > 0. Check that this is true before
trying to access the char at (len - 1).
Signed-off-by: David Wei <dw@davidwei.uk>1 parent 19f1235 commit d9923a1
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
429 | | - | |
| 429 | + | |
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
| |||
0 commit comments