[Commits] sslcertwindow.c 1.9.2.32 1.9.2.33
pawel at claws-mail.org
pawel at claws-mail.org
Wed Feb 1 19:26:57 CET 2012
Update of /home/claws-mail/claws/src/gtk
In directory srv:/tmp/cvs-serv3932/src/gtk
Modified Files:
Tag: gtk2
sslcertwindow.c
Log Message:
2012-02-01 [pawel] 3.8.0cvs20
* src/jpilot.c
* src/mutt.c
* src/pine.c
* src/procmsg.c
* src/vcard.c
* src/gtk/sslcertwindow.c
More strncat boundary checks
Index: sslcertwindow.c
===================================================================
RCS file: /home/claws-mail/claws/src/gtk/sslcertwindow.c,v
retrieving revision 1.9.2.32
retrieving revision 1.9.2.33
diff -u -d -r1.9.2.32 -r1.9.2.33
--- sslcertwindow.c 16 Feb 2011 07:16:22 -0000 1.9.2.32
+++ sslcertwindow.c 1 Feb 2012 18:26:55 -0000 1.9.2.33
@@ -94,8 +94,8 @@
tmp = g_malloc(BUFFSIZE);
if (gnutls_x509_crt_get_issuer_dn_by_oid(cert->x509_cert,
GNUTLS_OID_X520_COUNTRY_NAME, 0, 0, tmp, &n) == 0) {
- strncat(issuer_location, ", ", BUFFSIZE-strlen(issuer_location));
- strncat(issuer_location, tmp, BUFFSIZE-strlen(issuer_location));
+ strncat(issuer_location, ", ", BUFFSIZE-strlen(issuer_location)-1);
+ strncat(issuer_location, tmp, BUFFSIZE-strlen(issuer_location)-1);
}
g_free(tmp);
}
@@ -121,8 +121,8 @@
tmp = g_malloc(BUFFSIZE);
if (gnutls_x509_crt_get_dn_by_oid(cert->x509_cert,
GNUTLS_OID_X520_COUNTRY_NAME, 0, 0, tmp, &n) == 0) {
- strncat(subject_location, ", ", BUFFSIZE-strlen(subject_location));
- strncat(subject_location, tmp, BUFFSIZE-strlen(subject_location));
+ strncat(subject_location, ", ", BUFFSIZE-strlen(subject_location)-1);
+ strncat(subject_location, tmp, BUFFSIZE-strlen(subject_location)-1);
}
g_free(tmp);
}
More information about the Commits
mailing list