Hi all,

attached is a trivial patch fixing the following issues:

- libbalsa/folder-scanners.c: fix missing include on old systems which do not 
indirectly import string.h, remove obsolete macro
- libbalsa/libbalsa.c: fix one-byte buffer overflow in x509_fingerprint()

Best,
Albrecht.
diff --git a/libbalsa/folder-scanners.c b/libbalsa/folder-scanners.c
index 634af73ce..a3e703725 100644
--- a/libbalsa/folder-scanners.c
+++ b/libbalsa/folder-scanners.c
@@ -22,6 +22,7 @@
 #endif                          /* HAVE_CONFIG_H */
 #include "folder-scanners.h"
 
+#include <string.h>
 #include <glib/gstdio.h>
 
 #include "libbalsa.h"
@@ -30,10 +31,6 @@
 #include "imap-commands.h"
 #include "imap-server.h"
 
-#ifndef PATH_MAX
-#define PATH_MAX _POSIX_PATH_MAX
-#endif
-
 typedef void (*local_scanner_helper) (gpointer rnode,
                                       const gchar * prefix,
                                       LocalCheck check_local_path,
diff --git a/libbalsa/libbalsa.c b/libbalsa/libbalsa.c
index 090a0fcff..a93826658 100644
--- a/libbalsa/libbalsa.c
+++ b/libbalsa/libbalsa.c
@@ -525,7 +525,7 @@ x509_fingerprint(gnutls_x509_crt_t cert)
 
     buf_size = 20U;
     g_message("%d", gnutls_x509_crt_get_fingerprint(cert, GNUTLS_DIG_SHA1, sha1_buf, &buf_size));
-    str_buf = g_malloc0(60U);
+    str_buf = g_malloc0(61U);
     for (n = 0; n < 20; n++) {
     	sprintf(&str_buf[3 * n], "%02x:", sha1_buf[n]);
     }

Attachment: pgpJKjwLBso8I.pgp
Description: PGP signature

_______________________________________________
balsa-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/balsa-list

Reply via email to