alphacep / vosk-server

WebSocket, gRPC and WebRTC speech recognition server based on Vosk and Kaldi libraries
Apache License 2.0
882 stars 243 forks source link

Add null terminator to '{"eof" : 1}' #157

Closed xxmichas closed 2 years ago

xxmichas commented 2 years ago

I compiled the cpp server and found a memory leak while trying to integrate it with Node.js.

code: if (strcmp(message, "{\"eof\" : 1}") == 0) on the cpp server would incorrectly return false, because string "{\"eof\" : 1}" wasn't correctly terminated and the connection would stay open forever causing memory leaks