]> git.alsa-project.org Git - alsa-utils.git/commit
aplay/arecord: handle parsing errors of parameter values
authorerwin <nebelbank@posteo.de>
Fri, 11 Mar 2016 11:40:30 +0000 (11:40 +0000)
committerTakashi Iwai <tiwai@suse.de>
Fri, 11 Mar 2016 15:47:17 +0000 (16:47 +0100)
commitb5c06602306e89ae71c746b2db4d83d38cec7047
tree897b32dda43df6c3e0db541b69425b0141553572
parentccc108fb83bf31d6995c80ba9716ef3760f49637
aplay/arecord: handle parsing errors of parameter values

when a user enters a command, he expects his command to be executed
as specified or aborted if it is impossible to fulfill his request

right now a command like "arecord -d hw:1,0 --max-file-time 1h recording.wav"
will happily record something and exit without error status while the resulting
recording contains definitely not what the user requested

to fix this, the patch handles the number parsing function's error channel
and checks whether the parsed number has any trailing characters

Signed-off-by: erwin <nebelbank@posteo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
aplay/aplay.c