mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-13 07:45:26 +00:00
fix return value
This commit is contained in:
parent
7be60474ab
commit
aa15994c7f
@ -542,8 +542,10 @@ SWITCH_DECLARE(const char *) Stream::read(int *len)
|
||||
|
||||
buff = stream_p->read_function(stream_p, len);
|
||||
|
||||
if (!buff) return NULL;
|
||||
if (len < 0) return NULL;
|
||||
if (!buff || *len <= 0) {
|
||||
*len = 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return (const char *)buff;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user