openbsd-ports/news/tin/patches/patch-src_rfc2047_c
giovanni da09db4dad Update to 2.2.0
add some arc4random patches
take maintainership
ok & hints Joachim Shipper (old maintainer)
2014-04-29 16:41:36 +00:00

15 lines
480 B
Plaintext

$OpenBSD: patch-src_rfc2047_c,v 1.1 2014/04/29 16:41:36 giovanni Exp $
--- src/rfc2047.c.orig Fri Apr 18 12:52:50 2014
+++ src/rfc2047.c Fri Apr 18 12:53:26 2014
@@ -1031,9 +1031,8 @@ generate_random_mime_boundary(
{
size_t i;
- srand((unsigned int) time(NULL));
for (i = 0; i < len - 1; i++)
- boundary[i] = base64_alphabet[rand() % sizeof(base64_alphabet)];
+ boundary[i] = base64_alphabet[arc4random_uniform(sizeof(base64_alphabet))];
boundary[len - 1] = '\0';
}