Commit 76d2ced
committed
reiserfs: Replace one-element array with flexible-array member
One-element arrays are deprecated, and we are replacing them with flexible
array members instead. So, replace one-element array with flexible-array
member in direntry_uarea structure, and refactor the rest of the code,
accordingly.
Worth mentioning is that before these changes, the original implementation
was returning two-too many bytes in function direntry_create_vi():
fs/reiserfs/item_ops.c:464: int size = sizeof(struct direntry_uarea);
...
fs/reiserfs/item_ops.c-490- size += (dir_u->entry_count * sizeof(short));
...
fs/reiserfs/item_ops.c-517- return size;
Link: KSPP#79
Link: KSPP#290
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>1 parent 06c2afb commit 76d2ced
2 files changed
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2252 | 2252 | | |
2253 | 2253 | | |
2254 | 2254 | | |
2255 | | - | |
2256 | | - | |
| 2255 | + | |
| 2256 | + | |
| 2257 | + | |
2257 | 2258 | | |
2258 | 2259 | | |
2259 | 2260 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2373 | 2373 | | |
2374 | 2374 | | |
2375 | 2375 | | |
2376 | | - | |
| 2376 | + | |
2377 | 2377 | | |
2378 | 2378 | | |
2379 | 2379 | | |
| |||
0 commit comments