stream_cue: fix multiple bugs
commitd26f11deaf0baa6882e2f599868b8d7cfbaa3ee4
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>
Sun, 29 May 2011 11:12:42 +0000 (29 11:12 +0000)
committerUoti Urpala <uau@mplayer2.org>
Wed, 6 Jul 2011 05:54:49 +0000 (6 08:54 +0300)
treebdd648609d43f9d481799fde5dcdcd6a9c4e87aa
parent48fdd3d9268b55fe7e1743b43699b2650fb0db55
stream_cue: fix multiple bugs

Spelling fix.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33510 b3059339-0415-0410-9bf9-f77b7e298cf2

Simplify: remove an unnecessary loop variable.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33511 b3059339-0415-0410-9bf9-f77b7e298cf2

Add some "const".

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33512 b3059339-0415-0410-9bf9-f77b7e298cf2

Simplify NULL check.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33513 b3059339-0415-0410-9bf9-f77b7e298cf2

Avoid crash if terminating " is missing.
Part of patch by Ivan Kalvachev [ikalvachev gmail com].

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33514 b3059339-0415-0410-9bf9-f77b7e298cf2

Fix 0-termination being placed one byte too far.
Part of patch by Ivan Kalvachev [ikalvachev gmail com].

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33515 b3059339-0415-0410-9bf9-f77b7e298cf2

Ensure 0-termination even if line does not start with FILE "
Part of patch by Ivan Kalvachev [ikalvachev gmail com].

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33516 b3059339-0415-0410-9bf9-f77b7e298cf2

Only accept regular files as .bin files for .cue files.
In particular avoids trying to use directories as .bin
when e.g. we failed to extract a filename.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33517 b3059339-0415-0410-9bf9-f77b7e298cf2

Remove a duplicated open() call that could lead to a
file-descriptor leak in some cases.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33518 b3059339-0415-0410-9bf9-f77b7e298cf2

Avoid possible crash if cue filename is very short.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33519 b3059339-0415-0410-9bf9-f77b7e298cf2

Simplify by using av_strlcpy.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@33520 b3059339-0415-0410-9bf9-f77b7e298cf2
stream/stream_cue.c