From: Nikos Mavrogiannopoulos Date: Mon, 7 Oct 2002 16:36:26 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: gnutls_0_5_9~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9ec250ef19d96b682a67b800d302bf68620aa47f;p=thirdparty%2Fgnutls.git *** empty log message *** --- diff --git a/lib/gnutls_x509.c b/lib/gnutls_x509.c index 079effda3b..14e1091226 100644 --- a/lib/gnutls_x509.c +++ b/lib/gnutls_x509.c @@ -2849,10 +2849,13 @@ int gnutls_x509_extract_certificate_dn_string(char *buf, int sizeof_buf, buf[0] = 0; -#define PRINTX(buf, bufsize, x, y) { \ - if (y[0]!=0 && (strlen(x)+strlen(y)+4 < bufsize)) \ +#define PRINTX(buf, bufsize, x, y) \ + if (y[0]!=0 && (strlen(x)+strlen(y)+4 < bufsize)) { \ sprintf(buf, "/%s=%s", x, y); \ -} + } else { \ + return GNUTLS_E_INVALID_REQUEST; \ + } + if (!issuer) gnutls_x509_extract_certificate_dn(cert, &dn); else @@ -2872,5 +2875,5 @@ int gnutls_x509_extract_certificate_dn_string(char *buf, int sizeof_buf, len = strlen(buf); PRINTX(buf + len, sizeof_buf - len - 1, "E", dn.email); - return; + return 0; }