
alsa-project/alsa-lib issue #453 was opened from zkh8227:
#Description During the code review, I detected an issue with an uninitialized variable in the src/topology/data.c file. In the following calls, I couldn't find an initialization operation for id. Is it possible that the intention here was to call parent->id? #Error Details Bug Type: Uninitialized Variable File Path: src/topology/data.c Line Number: 1905,1908 Code Snippet: 1883 char id[SNDRV_CTL_ELEM_ID_NAME_MAXLEN]; ........ 1900 if (tplg_verify_tuples(tplg, pos, tp->array, tp->size) < 0) { 1901 if (tuples) { 1902 err = tplg_ref_add(elem, SND_TPLG_TYPE_TOKEN, parent->id); 1903 if (err < 0) 1904 return err; 1905 err = tplg_ref_add(elem2, SND_TPLG_TYPE_TUPLE, id); 1906 if (err < 0) 1907 return err; 1908 err = tplg_ref_add(parent, SND_TPLG_TYPE_DATA, id); 1909 if (err < 0) 1910 return err; 1911 tuples = NULL; 1912 }
Issue URL : https://github.com/alsa-project/alsa-lib/issues/453 Repository URL: https://github.com/alsa-project/alsa-lib