diff options
author | Christian Beier <dontmind@freeshell.org> | 2015-04-17 12:01:58 +0200 |
---|---|---|
committer | Christian Beier <dontmind@freeshell.org> | 2015-04-17 12:01:58 +0200 |
commit | b7946a6f36cde92f02bcc25f3599fe751482d781 (patch) | |
tree | b92f76d5d61d67557517eecda03f769b1268a960 /libvncserver/rfbssl_gnutls.c | |
parent | e9302ef7ac697b28ce2b3809e26ccce131969833 (diff) | |
parent | 97490d68b024d76f2ebb52d59ffb1e8acc399d5e (diff) | |
download | libtdevnc-b7946a6f36cde92f02bcc25f3599fe751482d781.tar.gz libtdevnc-b7946a6f36cde92f02bcc25f3599fe751482d781.zip |
Merge pull request #72 from lopago/fix-segfaults
prevent segfaults due to uninitialized memory
Diffstat (limited to 'libvncserver/rfbssl_gnutls.c')
-rw-r--r-- | libvncserver/rfbssl_gnutls.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libvncserver/rfbssl_gnutls.c b/libvncserver/rfbssl_gnutls.c index cf60cdc..e58cdad 100644 --- a/libvncserver/rfbssl_gnutls.c +++ b/libvncserver/rfbssl_gnutls.c @@ -109,6 +109,8 @@ struct rfbssl_ctx *rfbssl_init_global(char *key, char *cert) gnutls_global_set_log_function(rfbssl_log_func); gnutls_global_set_log_level(1); gnutls_certificate_set_dh_params(ctx->x509_cred, ctx->dh_params); + /* newly allocated memory should be initialized, at least where it is important */ + ctx->peekstart = ctx->peeklen = 0; return ctx; } |