-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
From 7624eefe5a1f116f1e2b4c43fb5933181d7cdfa3 Mon Sep 17 00:00:00 2001 | ||
From: Rodrigo Arias Mallo <[email protected]> | ||
Date: Sun, 3 Mar 2024 18:27:38 +0100 | ||
Subject: [PATCH] Use memset() instead of bzero() | ||
|
||
The bzero() function is removed in POSIX.1-2008. | ||
|
||
Fixes: https://github.com/dillo-browser/dillo/issues/91 | ||
--- | ||
dpid/dpidc.c | 18 ++++++++++++++---- | ||
1 file changed, 14 insertions(+), 4 deletions(-) | ||
|
||
diff --git a/dpid/dpidc.c b/dpid/dpidc.c | ||
index 58db9c3..1e0bb39 100644 | ||
--- a/dpid/dpidc.c | ||
+++ b/dpid/dpidc.c | ||
@@ -1,6 +1,16 @@ | ||
+/* | ||
+ * Copyright (C) 2009-2013 Jorge Arellano Cid <[email protected]> | ||
+ * Copyright (C) 2024 Rodrigo Arias Mallo <[email protected]> | ||
+ * | ||
+ * This program is free software; you can redistribute it and/or modify | ||
+ * it under the terms of the GNU General Public License as published by | ||
+ * the Free Software Foundation; either version 3 of the License, or | ||
+ * (at your option) any later version. | ||
+ */ | ||
+ | ||
#include <stdio.h> | ||
#include <stdlib.h> /* for exit */ | ||
-#include <string.h> /* for bzero */ | ||
+#include <string.h> /* for memset */ | ||
#include <unistd.h> /* for read and write */ | ||
#include <ctype.h> /* for isxdigit */ | ||
#include <sys/types.h> | ||
@@ -79,7 +89,7 @@ int main(int argc, char *argv[]) | ||
sockfd = socket(AF_INET, SOCK_STREAM, 0); | ||
if (sockfd < 0) | ||
error("ERROR opening socket"); | ||
- bzero((char *) &serv_addr, sizeof(serv_addr)); | ||
+ memset(&serv_addr, 0, sizeof(serv_addr)); | ||
serv_addr.sin_family = AF_INET; | ||
serv_addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); | ||
|
||
@@ -98,7 +108,7 @@ int main(int argc, char *argv[]) | ||
strcpy(buffer, CMD_REGISTER); | ||
} else if (strcmp(argv[1], "chat") == 0) { | ||
printf("Please enter the message: "); | ||
- bzero(buffer,256); | ||
+ memset(buffer,0,256); | ||
if (fgets(buffer,255,stdin) == NULL) | ||
MSG_ERR("dpidc: Can't read the message\n"); | ||
} else { | ||
@@ -111,7 +121,7 @@ int main(int argc, char *argv[]) | ||
if (n < 0) | ||
error("ERROR writing to socket"); | ||
/* | ||
- bzero(buffer,256); | ||
+ memset(buffer,0,256); | ||
n = read(sockfd,buffer,255); | ||
if (n < 0) | ||
error("ERROR reading from socket"); | ||
-- | ||
2.44.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Description: Fix OpenSSL 1.1 detection and access to now opaque structures. | ||
Bug-Debian: https://bugs.debian.org/845035 | ||
Author: Axel Beckert <[email protected]> | ||
Forwarded: http://lists.dillo.org/pipermail/dillo-dev/2017-September/011076.html | ||
|
||
--- a/configure.ac | ||
+++ b/configure.ac | ||
@@ -286,7 +286,7 @@ | ||
|
||
if test "x$ssl_ok" = "xyes"; then | ||
old_libs="$LIBS" | ||
- AC_CHECK_LIB(ssl, SSL_library_init, ssl_ok=yes, ssl_ok=no, -lcrypto) | ||
+ AC_CHECK_LIB(ssl, SSL_new, ssl_ok=yes, ssl_ok=no, -lcrypto) | ||
LIBS="$old_libs" | ||
fi | ||
|
||
--- a/dpi/https.c | ||
+++ b/dpi/https.c | ||
@@ -476,7 +476,7 @@ | ||
case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: | ||
/*Either self signed and untrusted*/ | ||
/*Extract CN from certificate name information*/ | ||
- if ((cn = strstr(remote_cert->name, "/CN=")) == NULL) { | ||
+ if ((cn = strstr(X509_get_subject_name((X509 *) remote_cert), "/CN=")) == NULL) { | ||
strcpy(buf, "(no CN given)"); | ||
} else { | ||
char *cn_end; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
TERMUX_PKG_HOMEPAGE=https://dillo-browser.github.io/ | ||
TERMUX_PKG_DESCRIPTION="A small, fast graphical web browser built on FLTK" | ||
TERMUX_PKG_LICENSE="GPL-3.0" | ||
TERMUX_PKG_MAINTAINER="@termux" | ||
TERMUX_PKG_VERSION="3.0.5" | ||
TERMUX_PKG_SRCURL=https://github.com/dillo-browser/dillo/releases/download/v${TERMUX_PKG_VERSION}/dillo-${TERMUX_PKG_VERSION}.tar.bz2 | ||
TERMUX_PKG_SHA256=db1be16c1c5842ebe07b419aa7c6ef11a45603a75df2877f99635f4f8345148b | ||
TERMUX_PKG_DEPENDS="fltk, libiconv, libjpeg-turbo, libpng, libx11, openssl, zlib" | ||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS=" | ||
--sysconfdir=${TERMUX_PREFIX}/etc | ||
--enable-cookies | ||
--enable-ssl | ||
" | ||
|
||
termux_step_pre_configure() { | ||
CFLAGS+=" -fcommon" | ||
autoreconf -fi | ||
} |