File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ extern struct list_head dm_verity_loadpin_trusted_root_digests;
12
12
struct dm_verity_loadpin_trusted_root_digest {
13
13
struct list_head node ;
14
14
unsigned int len ;
15
- u8 data [];
15
+ u8 data [] __counted_by ( len ) ;
16
16
};
17
17
18
18
#if IS_ENABLED (CONFIG_SECURITY_LOADPIN_VERITY )
Original file line number Diff line number Diff line change @@ -336,15 +336,14 @@ static int read_trusted_verity_root_digests(unsigned int fd)
336
336
rc = - ENOMEM ;
337
337
goto err ;
338
338
}
339
+ trd -> len = len ;
339
340
340
341
if (hex2bin (trd -> data , d , len )) {
341
342
kfree (trd );
342
343
rc = - EPROTO ;
343
344
goto err ;
344
345
}
345
346
346
- trd -> len = len ;
347
-
348
347
list_add_tail (& trd -> node , & dm_verity_loadpin_trusted_root_digests );
349
348
}
350
349
You can’t perform that action at this time.
0 commit comments