Without the patch
   agent-proxy -v
leads to a segmentation fault.

With the patch the usage instructions are shown if the number of
arguments is not 3.

Signed-off-by: Heinrich Schuchardt <xypron.g...@gmx.de>
---
 agent-proxy.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/agent-proxy.c b/agent-proxy.c
index d0a43bd..cf85633 100644
--- a/agent-proxy.c
+++ b/agent-proxy.c
@@ -1586,6 +1586,9 @@ int main(int argc, char *argv[])
                        }
                }
        }
+       if (pargs < 3)
+               usage();
+
        /* Initialize the master read and write handles */
        FD_ZERO(&master_rds);
        FD_ZERO(&master_wds);
-- 
2.17.0


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Kgdb-bugreport mailing list
Kgdb-bugreport@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to