Commit 99853d9
ecryptfs: Replace memcpy + NUL termination in ecryptfs_copy_filename
Use kmemdup_nul() to copy 'name' instead of using memcpy() followed by a
manual NUL termination. Remove the local return variable and the goto
label to simplify the code. No functional changes.
Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Acked-by: Tyler Hicks <code@tyhicks.com>
Signed-off-by: Tyler Hicks <code@tyhicks.com>1 parent 6ba6733 commit 99853d9
1 file changed
Lines changed: 4 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1418 | 1418 | | |
1419 | 1419 | | |
1420 | 1420 | | |
1421 | | - | |
1422 | | - | |
1423 | | - | |
1424 | | - | |
1425 | | - | |
1426 | | - | |
1427 | | - | |
1428 | | - | |
1429 | | - | |
1430 | | - | |
1431 | | - | |
1432 | | - | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
1433 | 1424 | | |
1434 | | - | |
1435 | | - | |
| 1425 | + | |
1436 | 1426 | | |
1437 | 1427 | | |
1438 | 1428 | | |
| |||
0 commit comments