openbsd-ports/mail/dspam/patches/patch-src_libdb3_drv_c

22 lines
741 B
Plaintext

$OpenBSD: patch-src_libdb3_drv_c,v 1.1 2005/10/26 06:18:39 jakob Exp $
--- src/libdb3_drv.c.orig Sat Sep 24 19:49:49 2005
+++ src/libdb3_drv.c Mon Oct 17 14:48:42 2005
@@ -90,7 +90,7 @@ _libdb3_drv_get_spamtotals (DSPAM_CTX *
memset (&key, 0, sizeof (DBT));
memset (&data, 0, sizeof (DBT));
- strcpy (hashkey, "_TOTALS");
+ strlcpy (hashkey, "_TOTALS", sizeof (hashkey));
key.data = hashkey;
key.size = strlen (hashkey);
@@ -141,7 +141,7 @@ _libdb3_drv_set_spamtotals (DSPAM_CTX *
memset (&key, 0, sizeof (DBT));
memset (&data, 0, sizeof (DBT));
- strcpy (hashkey, "_TOTALS");
+ strlcpy (hashkey, "_TOTALS", sizeof (hashkey));
key.data = hashkey;
key.size = strlen (hashkey);
data.data = &CTX->totals;