0
0
mirror of https://github.com/openwrt/packages.git synced 2025-02-07 09:19:51 +00:00
packages/utils/lrzsz/patches/200-format.patch
Andre Heider 6d6c4b21b5 lrzsz: update to v0.12.21rc and fix a CVE
This updates to v0.12.21rc from 1999 (sic), which was never officially
released. There're fixes in there, and it's what debian ships, so let's
use that too. While at it, use debian's autohell hack and package
description too.

Patch 1 fixes a hang with musl.
Patch 2 fixes CVE-2018-10195, add PKG_CPE_ID while at it.

Refesh the rest.

Fixes: CVE-2018-10195
Signed-off-by: Andre Heider <a.heider@gmail.com>
2023-01-15 15:14:06 +01:00

74 lines
1.8 KiB
Diff

--- a/lib/long-options.c
+++ b/lib/long-options.c
@@ -22,6 +22,7 @@
#endif
#include <stdio.h>
+#include <stdlib.h>
#include <getopt.h>
#include "long-options.h"
--- a/src/lrz.c
+++ b/src/lrz.c
@@ -2296,7 +2296,7 @@ exec2(const char *s)
if (*s == '!')
++s;
io_mode(0,0);
- execl("/bin/sh", "sh", "-c", s);
+ execl("/bin/sh", "sh", "-c", s, NULL);
zpfatal("execl");
exit(1);
}
--- a/src/lsyslog.c
+++ b/src/lsyslog.c
@@ -22,6 +22,7 @@
#ifdef ENABLE_SYSLOG
#include "zglobal.h"
#include <pwd.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#endif
--- a/src/lsz.c
+++ b/src/lsz.c
@@ -1988,7 +1988,7 @@ zsendfdata (struct zm_fileinfo *zi)
blklen = calc_blklen (total_sent);
total_sent += blklen + OVERHEAD;
if (Verbose > 2 && blklen != old)
- vstringf (_("blklen now %d\n"), blklen);
+ vstringf (_("blklen now %zu\n"), blklen);
#ifdef HAVE_MMAP
if (mm_addr) {
if (zi->bytes_sent + blklen < mm_size)
--- a/src/zm.c
+++ b/src/zm.c
@@ -453,7 +453,7 @@ zsda32(const char *buf, size_t length, i
int c;
unsigned long crc;
int i;
- VPRINTF(3,("zsdat32: %d %s", length, Zendnames[(frameend-ZCRCE)&3]));
+ VPRINTF(3,("zsdat32: %zu %s", length, Zendnames[(frameend-ZCRCE)&3]));
crc = 0xFFFFFFFFL;
zsendline_s(buf,length);
--- a/src/zreadline.c
+++ b/src/zreadline.c
@@ -68,7 +68,7 @@ readline_internal(unsigned int timeout)
else if (n==0)
n=1;
if (Verbose > 5)
- vstringf("Calling read: alarm=%d Readnum=%d ",
+ vstringf("Calling read: alarm=%u Readnum=%zu ",
n, readline_readnum);
signal(SIGALRM, zreadline_alarm_handler);
#ifdef HAVE_SIGINTERRUPT
@@ -77,7 +77,7 @@ readline_internal(unsigned int timeout)
alarm(n);
}
else if (Verbose > 5)
- vstringf("Calling read: Readnum=%d ",
+ vstringf("Calling read: Readnum=%zu ",
readline_readnum);
readline_ptr=readline_buffer;