SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

View file

@ -0,0 +1,28 @@
--- evdns.c.orig Tue Apr 20 20:35:13 2010
+++ evdns.c Tue Apr 20 20:36:31 2010
@@ -47,12 +47,14 @@
#ifndef DNS_USE_GETTIMEOFDAY_FOR_ID
#ifndef DNS_USE_OPENSSL_FOR_ID
#ifndef DNS_USE_FTIME_FOR_ID
+#ifndef DNS_USE_ARC4RANDOM_FOR_ID
#error Must configure at least one id generation method.
#error Please see the documentation.
#endif
#endif
#endif
#endif
+#endif
/* #define _POSIX_C_SOURCE 200507 */
#define _GNU_SOURCE
@@ -1080,6 +1082,10 @@ default_transaction_id_fn(void)
*/
abort();
}
+#endif
+
+#ifdef DNS_USE_ARC4RANDOM_FOR_ID
+ trans_id = arc4random() & 0xffff;
#endif
return trans_id;
}

View file

@ -0,0 +1,23 @@
--- http.c.orig Thu Jul 2 07:05:28 2009
+++ http.c Tue Apr 20 21:32:53 2010
@@ -281,15 +281,17 @@ evhttp_htmlescape(const char *html)
for (i = 0; i < old_size; ++i)
new_size += strlen(html_replace(html[i], scratch_space));
+ new_size++;
- p = escaped_html = malloc(new_size + 1);
+ p = escaped_html = malloc(new_size);
if (escaped_html == NULL)
- event_err(1, "%s: malloc(%d)", __func__, new_size + 1);
+ event_err(1, "%s: malloc(%d)", __func__, new_size);
for (i = 0; i < old_size; ++i) {
const char *replaced = html_replace(html[i], scratch_space);
/* this is length checked */
- strcpy(p, replaced);
+ strlcpy(p, replaced, new_size);
p += strlen(replaced);
+ new_size -= strlen(replaced);
}
*p = '\0';