Fix two memory errors in the profiles parser: an invalid read and a
"source and destination overlap in strncpy" warning.
When the profiles page is initialized it fetches the profile names from
the profiles file. When a profile wasn't defined in the file, the parser
made invalid reads outside the buffer.
Closes: https://github.com/alsa-project/alsa-tools/pull/34
Signed-off-by: Andreas Persson <andreasp56@outlook.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
File descriptors were leaked when "Save active profile" was pressed. Add
the missing calls to close.
Closes: https://github.com/alsa-project/alsa-tools/pull/33
Signed-off-by: Andreas Persson <andreasp56@outlook.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
envy24control crashed if you tried to start it with -f
/etc/envy24control/profiles.conf.
Closes: https://github.com/alsa-project/alsa-tools/pull/32
Signed-off-by: Andreas Persson <andreasp56@outlook.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>