discomfitor pushed a commit to branch master.

http://git.enlightenment.org/apps/empc.git/commit/?id=fd7ae69962c40dd5c2928e61a07850c997355a6e

commit fd7ae69962c40dd5c2928e61a07850c997355a6e
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Tue Nov 24 21:31:38 2015 -0500

    exit without crashing when empdd is run manually with --option
    
    fix T2591
---
 src/bin/empdd.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/bin/empdd.c b/src/bin/empdd.c
index 63442a3..bdc3ada 100644
--- a/src/bin/empdd.c
+++ b/src/bin/empdd.c
@@ -1387,6 +1387,14 @@ main(int argc, char *argv[])
 {
    struct mpd_settings *settings = NULL;
    const char *h, *pass, *p = NULL;
+   int i;
+
+   for (i = 0; i < argc; i++)
+     if (argv[i][0] == '-')
+       {
+          fprintf(stderr, "USAGE: %s <HOST<:PORT>> <PORT>\n", argv[0]);
+          return 1;
+       }
 
    pass = getenv("MPD_PASSWORD");
    p = getenv("MPD_PORT");

-- 


Reply via email to