diff options
author | Matthias Hopf <mhopf@suse.de> | 2009-01-01 19:25:07 +0100 |
---|---|---|
committer | Matthias Hopf <mhopf@suse.de> | 2009-01-01 19:25:07 +0100 |
commit | f834d9a8a46a8d3edfea5ea1c9ee66177dee7b04 (patch) | |
tree | d199c7400d59c137ee8e8d641559acfea42adcd7 /src/libsputext/demux_sputext.c | |
parent | 642887b80beb1f9404f32e68c1f63a11b703841e (diff) | |
download | xine-lib-f834d9a8a46a8d3edfea5ea1c9ee66177dee7b04.tar.gz xine-lib-f834d9a8a46a8d3edfea5ea1c9ee66177dee7b04.tar.bz2 |
check length parameter against buffer length in libsputext read_line_from_input
Currently, this is satisfied in all locations where it is called,
but it is more prudent to add the check.
Diffstat (limited to 'src/libsputext/demux_sputext.c')
-rw-r--r-- | src/libsputext/demux_sputext.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsputext/demux_sputext.c b/src/libsputext/demux_sputext.c index 3e9efb079..198c30498 100644 --- a/src/libsputext/demux_sputext.c +++ b/src/libsputext/demux_sputext.c @@ -147,7 +147,7 @@ static inline void trail_space(char *s) { static char *read_line_from_input(demux_sputext_t *this, char *line, off_t len) { off_t nread = 0; - if ((len - this->buflen) > 512) { + if ((len - this->buflen) > 512 && len < SUB_BUFSIZE) { if((nread = this->input->read(this->input, &this->buf[this->buflen], len - this->buflen)) < 0) { xprintf(this->stream->xine, XINE_VERBOSITY_DEBUG, "read failed.\n"); |