gnutls_session_get_data: fix possible buffer overflow
authorAlban Crequy <alban.crequy@collabora.co.uk>
Mon, 7 Nov 2011 18:51:27 +0000 (18:51 +0000)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 7 Nov 2011 20:31:14 +0000 (21:31 +0100)
commit190cef6eed37d0e73a73c1e205eb31d45ab60a3c
treef51d77bbe853d4cc363264fe6a5b23113588c4ce
parentc6b1847aff211db23cb1f12e8c55ce6055943750
gnutls_session_get_data: fix possible buffer overflow

The test to avoid the buffer overflow was always false because
session_data_size was set at the wrong place. This problem has been introduced
by this commit:

|commit ad4ed44c65e753e6d3a00104c049dd81826ccbf3
|Author: Nikos Mavrogiannopoulos <nmav@gnutls.org>
|Date:   Mon Nov 7 22:24:48 2005 +0000
|
|    This is the initial commit in the 1.3 branch. Ported from the PSK branch:
|    * PSK ciphersuites have been added.
|    * The session resumption data are now system independent.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
lib/gnutls_session.c