Coverity fixes: deref of NULL pointers

We were potentially passing (char *)NULL to string constructors.
This commit is contained in:
John Hood
2016-05-10 23:58:56 -04:00
parent da30bb74a2
commit 9a6e0d576d
+2 -1
View File
@@ -84,7 +84,8 @@ private:
public: public:
STMClient( const char *s_ip, const char *s_port, const char *s_key, const char *predict_mode ) STMClient( const char *s_ip, const char *s_port, const char *s_key, const char *predict_mode )
: ip( s_ip ), port( s_port ), key( s_key ), : ip( s_ip ? s_ip : "" ), port( s_port ? s_port : "" ),
key( s_key ? s_key : "" ),
escape_key( 0x1E ), escape_pass_key( '^' ), escape_pass_key2( '^' ), escape_key( 0x1E ), escape_pass_key( '^' ), escape_pass_key2( '^' ),
escape_requires_lf( false ), escape_key_help( L"?" ), escape_requires_lf( false ), escape_key_help( L"?" ),
saved_termios(), raw_termios(), saved_termios(), raw_termios(),