summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos <nmav@crystal.(none)>2007-12-03 01:17:37 +0200
committerNikos <nmav@crystal.(none)>2007-12-03 01:17:37 +0200
commit2913b86dd48e9ac2fa886a8b2721d3ac04bce5b4 (patch)
tree4e967b03d47c8fa5e9cab29a9cb08ec181ecf731
parentad454522fa9fcc11a27e88fdf674348617d5e71b (diff)
downloadgnutls-2913b86dd48e9ac2fa886a8b2721d3ac04bce5b4.tar.gz
added check for null priorities
-rw-r--r--lib/gnutls_priority.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/gnutls_priority.c b/lib/gnutls_priority.c
index 23b14650a5..c701d1729c 100644
--- a/lib/gnutls_priority.c
+++ b/lib/gnutls_priority.c
@@ -423,8 +423,15 @@ prio_add (priority_st * priority_list, int algo)
int
gnutls_priority_set (gnutls_session_t session, gnutls_priority_t priority)
{
+ if (priority == NULL)
+ {
+ gnutls_assert();
+ return GNUTLS_E_NO_CIPHER_SUITES;
+ }
+
memcpy (&session->internals.priorities, priority,
sizeof (struct gnutls_priority_st));
+
return 0;
}