Re: [MPlayer-dev-eng] [PATCH] Fix crashes when pthread_create fails
- Date: Sun, 4 Mar 2018 08:54:43 +0100
- From: Reimar Döffinger <Reimar.Doeffinger@xxxxxx>
- Subject: Re: [MPlayer-dev-eng] [PATCH] Fix crashes when pthread_create fails
On 02.03.2018, at 15:34, Zhouyang Jia <jiazhouyang09@xxxxxxxxx> wrote:
> I'm a PhD student. I analyzed the mplayer source code and found
> pthread_create missing error handling in several places, which may
> cause bad results like crash.
> I think it's unsafe to assume the library function would be correct.
> It would be better if we could handle the error properly.
I haven't checked the surrounding code so I might definitely be wrong, but I find it unlikely that just returning 0 will result in correct error handling.
I'd expect som memory deallocation and error handling in higher level function would be necessary, did you check?
Or trigger the error paths manually and run in valgrind?
Thanks for the patch either way though!
MPlayer-dev-eng mailing list