Closed petterreinholdtsen closed 4 years ago
[Ralph Giles]
I think it would be better to return
OV_EINVAL
here. Neitherword
norchannels
should be zero here.
Do you want to make your own version, or do you want me to change my pull request? I only know what has been used in Debian, and do not really have any opinion on how to properly fix it, but can of course modify the patch based on input. :)
-- Happy hacking Petter Reinholdtsen
I'm happy to have you write a better patch. If you can't figure it out submit what you have and I'll help.
[Ralph Giles]
I'm happy to have you write a better patch. If you can't figure it out submit what you have and I'll help.
OK. Updated patch pushed, this time only checking word and channels for zero, and returning OV_EINVAL if this is the case. I have no idea if this solve the original problem, though. :)
-- Happy hacking Petter Reinholdtsen
[Ralph Giles]
Thanks for writing a patch! I made a few suggestions to make the argument checking more defensive. With those addressed it should be good to merge.
OK, pushed updated patch making sure word is a positive number and channel is 1-255.
-- Happy hacking Petter Reinholdtsen
Merged as 0a4beb1d04f802c48016b11fb939690e24173168. Thanks!
0002-Avoid-SIGFPE-when-bytespersample-is-zero.patch from Debian, see https://bugs.debian.org/635906 .