[PATCH] Add patch to fix ucert

Mike McCormack mike at atratus.org
Sat Aug 18 02:04:57 EDT 2018


---
 package/system/ucert/patches/0001-Fix-cert-length.patch | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
 create mode 100644 package/system/ucert/patches/0001-Fix-cert-length.patch

diff --git a/package/system/ucert/patches/0001-Fix-cert-length.patch b/package/system/ucert/patches/0001-Fix-cert-length.patch
new file mode 100644
index 0000000000..8ccf4561fb
--- /dev/null
+++ b/package/system/ucert/patches/0001-Fix-cert-length.patch
@@ -0,0 +1,15 @@
+--- a/usign-exec.c	2018-08-09 03:48:11.000000000 +1000
++++ b/usign-exec.c	2018-08-18 16:03:41.393546235 +1000
+@@ -156,9 +156,10 @@
+ 		waitpid(pid, &status, 0);
+ 		status = WEXITSTATUS(status);
+ 		if (fingerprint && !WEXITSTATUS(status)) {
++			ssize_t r;
+ 			memset(fingerprint, 0, 17);
+-			read(fds[0], fingerprint, 17);
+-			if (fingerprint[16] != '\n')
++			r = read(fds[0], fingerprint, 17);
++			if (r < 16)
+ 				status = -1;
+ 
+ 			fingerprint[16] = '\0';
-- 
2.11.0


--------------36C366E8872BD3E3C9CED53A
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

--------------36C366E8872BD3E3C9CED53A--




More information about the openwrt-devel mailing list