[Pkg-wmaker-commits] [wmitime] 92/127: debian/patches/allow_display_with_no_args.patch: Print warning when user runs wmitime -display without an argument instead of segfaulting (Closes: #716466).
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Sat Aug 22 01:34:41 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmitime.
commit b74dcebd7815952f88d45abe0407343328f34d0e
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date: Mon Aug 4 10:33:02 2014 -0500
debian/patches/allow_display_with_no_args.patch: Print warning when user runs wmitime -display without an argument instead of segfaulting (Closes: #716466).
---
debian/patches/allow_display_with_no_args.patch | 22 ++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 23 insertions(+)
diff --git a/debian/patches/allow_display_with_no_args.patch b/debian/patches/allow_display_with_no_args.patch
new file mode 100644
index 0000000..1369f35
--- /dev/null
+++ b/debian/patches/allow_display_with_no_args.patch
@@ -0,0 +1,22 @@
+Description: Allow -display option with no argument.
+ Previously, if a user ran wmitime with the -display option and no argument,
+ a segmentation fault would occur. This patch prints a warning instead.
+Author: Doug Torrance <dtorrance at monmouthcollege.edu>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=716466
+Last-Update: 2014-08-04
+
+--- a/wmgeneral/wmgeneral.c
++++ b/wmgeneral/wmgeneral.c
+@@ -385,7 +385,11 @@
+ for (i=1; argv[i]; i++) {
+ if (!strcmp(argv[i], "-display")) {
+ display_name = argv[i+1];
+- i++;
++ if (!display_name)
++ printf("Please provide an argument for "
++ "-display.\n");
++ else
++ i++;
+ }
+ if (!strcmp(argv[i], "-geometry")) {
+ geometry = argv[i+1];
diff --git a/debian/patches/series b/debian/patches/series
index 96eb9bf..d3adf19 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
10-hungarian-date.patch
20-makefile-CC.patch
make-install.patch
+allow_display_with_no_args.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmitime.git
More information about the Pkg-wmaker-commits
mailing list