talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 85a726bd2e25c62bafbe7a2c69532b980ecdfc4e
parent 8561e0a70434b49dc183d1a58f7848ec9ce68ec2
Author: Paul <paul@claws-mail.org>
Date:   Tue,  8 Sep 2020 13:21:43 +0100

keep gcc from grumbling

Diffstat:
Msrc/gtk/sslcertwindow.c | 12++++++------
1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/gtk/sslcertwindow.c b/src/gtk/sslcertwindow.c @@ -82,14 +82,14 @@ static GtkWidget *cert_presenter(SSLCertificate *cert) n = BUFFSIZE; if (gnutls_x509_crt_get_issuer_dn_by_oid(cert->x509_cert, GNUTLS_OID_X520_COMMON_NAME, 0, 0, issuer_commonname, &n)) - strncpy(issuer_commonname, _("<not in certificate>"), BUFFSIZE); + strncpy(issuer_commonname, _("<not in certificate>"), BUFFSIZE-1); n = BUFFSIZE; if (gnutls_x509_crt_get_issuer_dn_by_oid(cert->x509_cert, GNUTLS_OID_X520_LOCALITY_NAME, 0, 0, issuer_location, &n)) { if (gnutls_x509_crt_get_issuer_dn_by_oid(cert->x509_cert, GNUTLS_OID_X520_COUNTRY_NAME, 0, 0, issuer_location, &n)) { - strncpy(issuer_location, _("<not in certificate>"), BUFFSIZE); + strncpy(issuer_location, _("<not in certificate>"), BUFFSIZE-1); } } else { tmp = g_malloc(BUFFSIZE); @@ -104,19 +104,19 @@ static GtkWidget *cert_presenter(SSLCertificate *cert) n = BUFFSIZE; if (gnutls_x509_crt_get_issuer_dn_by_oid(cert->x509_cert, GNUTLS_OID_X520_ORGANIZATION_NAME, 0, 0, issuer_organization, &n)) - strncpy(issuer_organization, _("<not in certificate>"), BUFFSIZE); + strncpy(issuer_organization, _("<not in certificate>"), BUFFSIZE-1); n = BUFFSIZE; if (gnutls_x509_crt_get_dn_by_oid(cert->x509_cert, GNUTLS_OID_X520_COMMON_NAME, 0, 0, subject_commonname, &n)) - strncpy(subject_commonname, _("<not in certificate>"), BUFFSIZE); + strncpy(subject_commonname, _("<not in certificate>"), BUFFSIZE-1); n = BUFFSIZE; if (gnutls_x509_crt_get_dn_by_oid(cert->x509_cert, GNUTLS_OID_X520_LOCALITY_NAME, 0, 0, subject_location, &n)) { if (gnutls_x509_crt_get_dn_by_oid(cert->x509_cert, GNUTLS_OID_X520_COUNTRY_NAME, 0, 0, subject_location, &n)) { - strncpy(subject_location, _("<not in certificate>"), BUFFSIZE); + strncpy(subject_location, _("<not in certificate>"), BUFFSIZE-1); } } else { tmp = g_malloc(BUFFSIZE); @@ -131,7 +131,7 @@ static GtkWidget *cert_presenter(SSLCertificate *cert) n = BUFFSIZE; if (gnutls_x509_crt_get_dn_by_oid(cert->x509_cert, GNUTLS_OID_X520_ORGANIZATION_NAME, 0, 0, subject_organization, &n)) - strncpy(subject_organization, _("<not in certificate>"), BUFFSIZE); + strncpy(subject_organization, _("<not in certificate>"), BUFFSIZE-1); exp_time_t = gnutls_x509_crt_get_expiration_time(cert->x509_cert);