summaryrefslogtreecommitdiff
path: root/harmony/busybox/0012-microcom-segfault.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-02-27 14:34:02 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-02-27 14:34:02 -0600
commit7553795ec2d735c01dbdde129a65b7f45d5aa999 (patch)
treeb3970009a8246b0c17a105fe6b10c8077fc2b763 /harmony/busybox/0012-microcom-segfault.patch
parente2b01859c88d221992403d1293d42da33002be4d (diff)
downloadpackages-7553795ec2d735c01dbdde129a65b7f45d5aa999.tar.gz
packages-7553795ec2d735c01dbdde129a65b7f45d5aa999.tar.bz2
packages-7553795ec2d735c01dbdde129a65b7f45d5aa999.tar.xz
packages-7553795ec2d735c01dbdde129a65b7f45d5aa999.zip
Add harmony/ repo for packages still being discussed
See https://wiki.adelielinux.org/wiki/Project:Harmony
Diffstat (limited to 'harmony/busybox/0012-microcom-segfault.patch')
-rw-r--r--harmony/busybox/0012-microcom-segfault.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/harmony/busybox/0012-microcom-segfault.patch b/harmony/busybox/0012-microcom-segfault.patch
new file mode 100644
index 000000000..4789079b3
--- /dev/null
+++ b/harmony/busybox/0012-microcom-segfault.patch
@@ -0,0 +1,31 @@
+From fd8a0116a29ea4014fac7fbdba2636fc7b51ffc2 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] 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 14b9f3baf..38f6425c1 100644
+--- a/miscutils/microcom.c
++++ b/miscutils/microcom.c
+@@ -78,6 +78,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.13.3
+