From: Nikos Mavrogiannopoulos Date: Tue, 5 Nov 2013 22:17:47 +0000 (+0100) Subject: bug fix in gnutls_x509_crt_set_dn() at DN parsing. X-Git-Tag: gnutls_3_2_7~107 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72d25022f6f43b03da87109cd785b5cf7fbc0f4c;p=thirdparty%2Fgnutls.git bug fix in gnutls_x509_crt_set_dn() at DN parsing. --- diff --git a/lib/x509/x509_dn.c b/lib/x509/x509_dn.c index 31d83b69ee..384ad87422 100644 --- a/lib/x509/x509_dn.c +++ b/lib/x509/x509_dn.c @@ -132,7 +132,7 @@ gnutls_datum_t name, val; if (crt == NULL || dn == NULL) return gnutls_assert_val(GNUTLS_E_INVALID_REQUEST); - + /* For each element */ while (*p != 0 && *p != '\n') { @@ -156,7 +156,8 @@ gnutls_datum_t name, val; if (*p != ',' && *p != 0 && *p != '\n') return gnutls_assert_val(GNUTLS_E_PARSING_ERROR); - p++; + if (*p == ',') + p++; } return 0;