summaryrefslogtreecommitdiffstats
path: root/stream/stream_ftp.c
Commit message (Collapse)AuthorAgeFilesLines
* stream_ftp: cleanupsal2012-12-031-19/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stream ftp: Pass full buffer size to snprintf Previously the buffer size was always passed as one less than the underlying buffer's size. This is not using the underlying buffer to its full potential according to the C99 standard. The last byte of the buffers were never used. No vulnerabilities should have been caused by this mistake because the strings stored in the buffers were zero terminated at all times. Neither were out-of-array writes nor reads possible. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35488 b3059339-0415-0410-9bf9-f77b7e298cf2 stream ftp: open_f: Mark parameter file_format unused We have nothing to say about it, so we do not set *file_format. No need for compilers to emit a warning about it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35489 b3059339-0415-0410-9bf9-f77b7e298cf2 stream ftp: Set type to STREAMTYPE_STREAM Previously this was not set at all from within the stream_ftp module. This caused the run-time warning message "Streams need a type!". The actual behaviour should not be affected by this change. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35490 b3059339-0415-0410-9bf9-f77b7e298cf2 stream ftp: Use C99 designated initializers Simplify the initialization of the stream private struct's defaults. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35491 b3059339-0415-0410-9bf9-f77b7e298cf2 stream ftp: Remove unneeded cast At worst these kind of casts can hide real errors. As it is, it is just not needed at all, thus remove it. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35492 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_ftp: fix compilation with libavStefano Pigozzi2012-11-221-1/+1
| | | | | Fixup commit for a04b35013a055926ab57f60137518a204ce9e753. That commit was cherry-picked from mplayer(1) and thus assumes ffmpeg.
* stream_ftp: support longer filenamesal2012-11-211-31/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change was split into 8 patches. Squash them together, as they affect stream_ftp.c only. stream ftp: readline: Fix off-by-one error Even if max bytes are available read at most max - 1 bytes. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35427 b3059339-0415-0410-9bf9-f77b7e298cf2 Conflicts: stream/stream_ftp.c stream ftp: readline: Always initialize output parameter buf Only exception if passed parameter max is less than or equal to zero. That cannot happen with the current code. Additionally change readresp function to always copy the first response line if the parameter rsp is non-NULL. This fixes some error reporting that used uninitialized stack arrays. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35428 b3059339-0415-0410-9bf9-f77b7e298cf2 stream ftp: readline: Always try to read complete lines If there is not enough space in the provided line buffer just skip the remaining bytes until reaching EOL. Usually we are only interested in the first 5 characters and for everything else the (on-stack) response buffer should still be big enough. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35429 b3059339-0415-0410-9bf9-f77b7e298cf2 stream ftp: Revise file descriptor usage * Set unbound descriptor variables to -1 * Always test >= 0 to see if a variable refers to a valid descriptor git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35430 b3059339-0415-0410-9bf9-f77b7e298cf2 stream ftp: Only send QUIT command if connected Do not attempt to send commands without control connections. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35431 b3059339-0415-0410-9bf9-f77b7e298cf2 stream ftp: Create buffers before opening control connection git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35432 b3059339-0415-0410-9bf9-f77b7e298cf2 stream ftp: Allocate command buffer on-heap git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35433 b3059339-0415-0410-9bf9-f77b7e298cf2 stream ftp: Increase command buffer size Allow for more longish file names (be it because of length or more lengthy characters). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35434 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream, demux: replace off_t with int64_twm42012-11-201-2/+2
| | | | | | On reasonable systems, these types were the same anyway. Even on unreasonable systems (seriously, which?), this may reduce potential breakage.
* Rename directories, move files (step 2 of 2)wm42012-11-121-3/+3
| | | | | | | | | | | | Finish renaming directories and moving files. Adjust all include statements to make the previous commit compile. The two commits are separate, because git is bad at tracking renames and content changes at the same time. Also take this as an opportunity to remove the separation between "common" and "mplayer" sources in the Makefile. ("common" used to be shared between mplayer and mencoder.)
* stream_ftp: fix double free in one error caseUoti Urpala2012-10-301-1/+0
|
* cleanup: don't check for NULL before free()diego2010-11-081-1/+1
| | | | | | patch by Clément Bœsch, ubitux gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32598 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream: Use MSG_NOSIGNAL flag if available for send().reimar2010-11-021-3/+3
| | | | | | | | This avoids MPlayer quitting due to SIGPIPE at least for these cases. Ignoring SIGPIPE in general would break window-closing with some window-managers. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31566 b3059339-0415-0410-9bf9-f77b7e298cf2
* Delete things related to old translation systemUoti Urpala2010-03-101-1/+0
| | | | | Remove the help/ subdirectory, configure code to create toplevel help_mp.h, and all the '#include "help_mp.h"' lines from .c files.
* Add license header to all files missing it in the stream subdirectory.diego2010-01-301-0/+17
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30468 b3059339-0415-0410-9bf9-f77b7e298cf2
* Fix ftp support to properly support large files > 2GB.reimar2010-01-241-3/+4
| | | | | | | Patch by Yuriy Kaminskiy [yumkam mail ru] git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30418 b3059339-0415-0410-9bf9-f77b7e298cf2
* whitespace cosmetics: Remove all trailing whitespace.diego2009-05-131-16/+16
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@29305 b3059339-0415-0410-9bf9-f77b7e298cf2
* Convert HAVE_WINSOCK2_H into a 0/1 definition.diego2009-02-011-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28437 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move '#define closesocket close' preprocessor directive to a common placediego2008-09-011-1/+1
| | | | | | | and put it under the proper '#ifndef HAVE_CLOSESOCKET' condition. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27505 b3059339-0415-0410-9bf9-f77b7e298cf2
* Revert moving closesocket definition and network headers to network.h.diego2008-08-311-1/+6
| | | | | | | This caused lots of trouble on MinGW, we need a different solution. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27504 b3059339-0415-0410-9bf9-f77b7e298cf2
* Move duplicated '#define closesocket close' into network.h along withdiego2008-08-291-6/+1
| | | | | | | network-related #include #ifdeffery. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27496 b3059339-0415-0410-9bf9-f77b7e298cf2
* Rename HAVE_WINSOCK preprocessor condition to HAVE_WINSOCK_H.diego2008-08-291-1/+1
| | | | | | | | | This is what it is called in FFmpeg and more consistent with other names for similar conditionals. This fixes a potential compilation failure on MinGW, as described in Bugzilla #1262. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27493 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: Remove useless parentheses from return statements.diego2008-05-161-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@26788 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_opts should be constreimar2008-01-131-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25719 b3059339-0415-0410-9bf9-f77b7e298cf2
* stream_opts arrays should be constreimar2007-12-021-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25270 b3059339-0415-0410-9bf9-f77b7e298cf2
* Mark all stream_info_t as constreimar2007-12-021-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25239 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: typo fix UNSUPORTED --> UNSUPPORTEDdiego2007-08-281-1/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24277 b3059339-0415-0410-9bf9-f77b7e298cf2
* cosmetics: misc typo fixesdiego2007-07-281-3/+3
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23893 b3059339-0415-0410-9bf9-f77b7e298cf2
* isolated tcp socket code from network.c to a dedicated fileben2006-08-051-0/+1
| | | | git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19341 b3059339-0415-0410-9bf9-f77b7e298cf2
* introduce new 'stream' directory for all stream layer related components and ↵ben2006-07-311-0/+469
split them from libmpdemux git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19277 b3059339-0415-0410-9bf9-f77b7e298cf2