mirror of https://github.com/mpv-player/mpv
uber 10l found by Ilia <chest4l at mail.ru>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@12638 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
f7d64b75ec
commit
8224d57146
|
@ -79,12 +79,12 @@ url_new(const char* url) {
|
|||
}
|
||||
pos1 = ptr1-escfilename;
|
||||
Curl->protocol = (char*)malloc(pos1+1);
|
||||
strncpy(Curl->protocol, escfilename, pos1);
|
||||
if( Curl->protocol==NULL ) {
|
||||
mp_msg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed!\n");
|
||||
url_free(Curl);
|
||||
return NULL;
|
||||
}
|
||||
strncpy(Curl->protocol, escfilename, pos1);
|
||||
Curl->protocol[pos1] = '\0';
|
||||
|
||||
// jump the "://"
|
||||
|
|
Loading…
Reference in New Issue