~siretart/xine-lib/ubuntu

« back to all changes in this revision

Viewing changes to src/input/input_http.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2005-12-15 13:13:45 UTC
  • mfrom: (0.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051215131345-8n4osv1j7fy9c1s1
* SECURITY UPDATE: Fix arbitrary code execution with crafted PNG images in
  embedded ffmpeg copy.
* src/libffmpeg/libavcodec/utils.c, avcodec_default_get_buffer(): Apply
  upstream patch to fix buffer overflow on decoding of small PIX_FMT_PAL8
  PNG files.
* References:
  CVE-2005-4048
  http://mplayerhq.hu/pipermail/ffmpeg-devel/2005-November/005333.html
  http://www1.mplayerhq.hu/cgi-bin/cvsweb.cgi/ffmpeg/libavcodec/
  utils.c.diff?r1=1.161&r2=1.162&cvsroot=FFMpeg

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 *
20
20
 * input plugin for http network streams
21
21
 *
22
 
 * $Id: input_http.c,v 1.102.2.3 2005/04/20 17:21:08 mroi Exp $
 
22
 * $Id: input_http.c,v 1.111 2005/10/14 21:02:16 miguelfreitas Exp $
23
23
 */
24
24
 
25
25
#ifdef HAVE_CONFIG_H
850
850
        if (!strncasecmp(this->buf, TAG_ICY_NAME, sizeof(TAG_ICY_NAME) - 1)) {
851
851
          _x_meta_info_set(this->stream, XINE_META_INFO_ALBUM,
852
852
                           (this->buf + sizeof(TAG_ICY_NAME) - 1 +
853
 
                            (*(this->buf + sizeof(TAG_ICY_NAME)) == ' ')));
 
853
                            (*(this->buf + sizeof(TAG_ICY_NAME) - 1) == ' ')));
854
854
          _x_meta_info_set(this->stream, XINE_META_INFO_TITLE,
855
855
                           (this->buf + sizeof(TAG_ICY_NAME) - 1 +
856
 
                            (*(this->buf + sizeof(TAG_ICY_NAME)) == ' ')));
 
856
                            (*(this->buf + sizeof(TAG_ICY_NAME) - 1) == ' ')));
857
857
        }
858
858
        
859
859
        if (!strncasecmp(this->buf, TAG_ICY_GENRE, sizeof(TAG_ICY_GENRE) - 1)) {
860
860
          _x_meta_info_set(this->stream, XINE_META_INFO_GENRE,
861
861
                          (this->buf + sizeof(TAG_ICY_GENRE) - 1 +
862
 
                           (*(this->buf + sizeof(TAG_ICY_GENRE)) == ' ')));
 
862
                           (*(this->buf + sizeof(TAG_ICY_GENRE) - 1) == ' ')));
863
863
        }
864
864
        
865
865
        /* icy-notice1 is always the same */
866
866
        if (!strncasecmp(this->buf, TAG_ICY_NOTICE2, sizeof(TAG_ICY_NOTICE2) - 1)) {
 
867
          char *end;
 
868
          if((end = strstr(this->buf, "<BR>")))
 
869
            *end = '\0';
 
870
 
867
871
          _x_meta_info_set(this->stream, XINE_META_INFO_COMMENT,
868
872
                           (this->buf + sizeof(TAG_ICY_NOTICE2) - 1 +
869
 
                            (*(this->buf + sizeof(TAG_ICY_NOTICE2)) == ' ')));
 
873
                            (*(this->buf + sizeof(TAG_ICY_NOTICE2) - 1) == ' ')));
870
874
        }
871
875
  
872
876
        /* metadata interval (in byte) */
1055
1059
 
1056
1060
plugin_info_t xine_plugin_info[] = {
1057
1061
  /* type, API, "name", version, special_info, init_function */  
1058
 
  { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 16, "http", XINE_VERSION_CODE, NULL, init_class },
 
1062
  { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 17, "http", XINE_VERSION_CODE, NULL, init_class },
1059
1063
  { PLUGIN_NONE, 0, "", 0, NULL, NULL }
1060
1064
};