diff options
Diffstat (limited to 'thirdparty/opus/stream.c')
-rw-r--r-- | thirdparty/opus/stream.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/thirdparty/opus/stream.c b/thirdparty/opus/stream.c index 6a85197a66..0238a6b31b 100644 --- a/thirdparty/opus/stream.c +++ b/thirdparty/opus/stream.c @@ -235,7 +235,8 @@ void *op_fopen(OpusFileCallbacks *_cb,const char *_path,const char *_mode){ fp=fopen(_path,_mode); #else fp=NULL; - { + if(_path==NULL||_mode==NULL)errno=EINVAL; + else{ wchar_t *wpath; wchar_t *wmode; wpath=op_utf8_to_utf16(_path); @@ -265,7 +266,8 @@ void *op_freopen(OpusFileCallbacks *_cb,const char *_path,const char *_mode, fp=freopen(_path,_mode,(FILE *)_stream); #else fp=NULL; - { + if(_path==NULL||_mode==NULL)errno=EINVAL; + else{ wchar_t *wpath; wchar_t *wmode; wpath=op_utf8_to_utf16(_path); |