jspy does SIGSEGV when trying to assign an address to listen on.

Signed-off-by: Kurt Van Dijck <[email protected]>
---
Index: jspy.c
===================================================================
--- jspy.c      (revision 1251)
+++ jspy.c      (working copy)
@@ -135,10 +135,12 @@
                break;
        }
        if (argv[optind]) {
+               optarg = argv[optind];
                ret = libj1939_str2addr(optarg, 0, &s.addr);
-               if (ret < 0)
+               if (ret < 0) {
                        error(0, 0, "bad URI %s", optarg);
                        return 1;
+               }
        }
 
        buf = malloc(s.pkt_len);
_______________________________________________
Socketcan-core mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-core

Reply via email to