[MPlayer-dev-eng] Re: [MPlayer-users] subtitle reader crashes on Solaris
Alex Beregszaszi
alex at fsn.hu
Mon Jul 28 01:09:45 CEST 2003
Hi,
> > the subtitle reader that automatically tries to open a matching
> > subtitle file for your video, crashes on Solaris. This happens
> > everytime there is a .txt file in the same directory as the video
> > file.
>
> OK,
>
> I've found the problem, it's in subreader.c. On Solaris, you cannot
> pass a null pointer to sprintf, as in this code snippet:
> sprintf(tmpresult, "%s %s", f_fname_trim, tmp_sub_id);
> If tmp_sub_id is a null pointer, this causes a segmentation fault on
> Solaris. On Linux, the string (null) is generated instead.
>
> I've tried to emulate this with the attached patch, please take a
> look.
Hopefully fixed it the right way(tm)
--
Alex Beregszaszi <alex at fsn.hu>
(MPlayer Core Developer -- http://www.mplayerhq.hu/)
More information about the MPlayer-dev-eng
mailing list