mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 17:01:08 +02:00
netfile: fix posible segfalt with chunked mode
Origin commit data
------------------
Branch: ni/coolstream
Commit: d304836498
Author: Jacek Jendrzej <overx300@gmail.com>
Date: 2020-01-14 (Tue, 14 Jan 2020)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1771,11 +1771,14 @@ void CacheFillThread(void *c)
|
||||
char ch = buf[0];
|
||||
if(ch > 0)
|
||||
{
|
||||
size_t icybufsize = 256*16+1;
|
||||
char icybuf[icybufsize];
|
||||
memset(icybuf,0, icybufsize);
|
||||
int len = (ch * 16);
|
||||
memset(buf,0, meta_interval);
|
||||
rval = http_read_stream_all(scache->fd, buf,len );
|
||||
fprintf(stderr,"##### len %i meta_interval %i chunkSize %i\n",len,meta_interval,chunkSize);
|
||||
rval = http_read_stream_all(scache->fd, icybuf,len );
|
||||
chunkSize -= rval;
|
||||
ShoutCAST_ParseMetaData(buf, scache->filter_arg->state);
|
||||
ShoutCAST_ParseMetaData(icybuf, scache->filter_arg->state);
|
||||
if(scache->filter_arg->state->cb)
|
||||
scache->filter_arg->state->cb(scache->filter_arg->state);
|
||||
}
|
||||
|
Reference in New Issue
Block a user