aboutsummaryrefslogtreecommitdiffstats
path: root/main/busybox/0014-miscutils-microcom-Fixed-segfault.patch
diff options
context:
space:
mode:
authorSören Tempel <soeren+git@soeren-tempel.net>2018-03-06 16:54:09 +0100
committerSören Tempel <soeren+git@soeren-tempel.net>2018-03-11 14:27:25 +0100
commitdc6cfb7cebc64cdb278f02d32f897819bba5f983 (patch)
tree04cb1d5a44a1da6d2420fbfe2eaf6a5c0c728cb8 /main/busybox/0014-miscutils-microcom-Fixed-segfault.patch
parent4923b942bfc1889d3b2f3f6cb20b2aeef6a65f06 (diff)
downloadaports-dc6cfb7cebc64cdb278f02d32f897819bba5f983.tar.gz
aports-dc6cfb7cebc64cdb278f02d32f897819bba5f983.tar.bz2
aports-dc6cfb7cebc64cdb278f02d32f897819bba5f983.tar.xz
main/busybox: upgrade to 1.28.1
Diffstat (limited to 'main/busybox/0014-miscutils-microcom-Fixed-segfault.patch')
-rw-r--r--main/busybox/0014-miscutils-microcom-Fixed-segfault.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/main/busybox/0014-miscutils-microcom-Fixed-segfault.patch b/main/busybox/0014-miscutils-microcom-Fixed-segfault.patch
new file mode 100644
index 0000000000..59114460a2
--- /dev/null
+++ b/main/busybox/0014-miscutils-microcom-Fixed-segfault.patch
@@ -0,0 +1,31 @@
+From 2881266313824ed1c2d422ea905e25509f9bc924 Mon Sep 17 00:00:00 2001
+From: Marian Buschsieweke <marian.buschsieweke@ovgu.de>
+Date: Wed, 2 Aug 2017 23:36:08 +0200
+Subject: [PATCH 14/16] miscutils/microcom: Fixed segfault
+
+microcom did not check if required parameter TTY is present. Thus,
+bb_basename() was called with a NULL pointer if TTY was missing.
+This commit adds the missing check.
+---
+ miscutils/microcom.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/miscutils/microcom.c b/miscutils/microcom.c
+index fa090057e..96ea02b16 100644
+--- a/miscutils/microcom.c
++++ b/miscutils/microcom.c
+@@ -76,6 +76,11 @@ int microcom_main(int argc UNUSED_PARAM, char **argv)
+ // argc -= optind;
+ argv += optind;
+
++ if (*argv == NULL){
++ bb_show_usage();
++ return EXIT_FAILURE;
++ }
++
+ // try to create lock file in /var/lock
+ device_lock_file = (char *)bb_basename(argv[0]);
+ device_lock_file = xasprintf("/var/lock/LCK..%s", device_lock_file);
+--
+2.16.2
+