summaryrefslogtreecommitdiff
path: root/lib/utils
diff options
context:
space:
mode:
authorDong Du <[email protected]>2021-09-01 11:06:24 +0800
committerAnup Patel <[email protected]>2021-09-03 12:16:01 +0530
commitbd355213bfbb209c047e8cc0df56936f6705477f (patch)
tree464818a5df66b9652c1a1e730e2f9ee8b37f4859 /lib/utils
parent1718b1642ee8c31eb2c49d78b5834e06f3324394 (diff)
lib: sbi: Refine the way to construct platform features
sbi_platform_get_features_str() uses sbi_snprintf() to construct the features_str. However, it passes the wrong length value (i.e., the nfstr), which should be (nfstr-offset) as the starting point of str (i.e., features_str + offset) changes. This commit also checks the return value of snprintf, and handles the corner case that the string buffer is full. Signed-off-by: Dong Du <[email protected]> Reviewed-by: Atish Patra <[email protected]>
Diffstat (limited to 'lib/utils')
0 files changed, 0 insertions, 0 deletions