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:
alex 2004-06-25 14:57:01 +00:00
parent f7d64b75ec
commit 8224d57146
1 changed files with 1 additions and 1 deletions

View File

@ -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 "://"