mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2026-03-22 05:33:43 -04:00
coverity.com fixes - initial round
This commit tries to fix a bunch of issues found by coverity.com. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
f0679e5de2
commit
47f4f9b73b
40 changed files with 283 additions and 133 deletions
|
|
@ -612,7 +612,7 @@ static char *rval_sysfs_main(snd_use_case_mgr_t *uc_mgr, const char *top_path, c
|
|||
if (s == NULL)
|
||||
return NULL;
|
||||
len = s - id - 1;
|
||||
if ((size_t)(len - 1) > sizeof(link) - 1)
|
||||
if ((size_t)len > sizeof(link) - 1)
|
||||
return NULL;
|
||||
strncpy(link, id + 1, len);
|
||||
link[len] = '\0';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue