[patch] fix segfault in remote control mode
Dave Peticolas <[email protected]>
| Newsgroups | gmane.comp.db.rrdtool.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi, I can segfault rrdtool in remote control mode by entering a cd command with no arguments. I think this patch fixes the problem. thanks, dave ps. rrdtool is great _______________________________________________ rrd-developers mailing list [email protected] https://lists.oetiker.ch/cgi-bin/listinfo/rrd-developers
rrdtool.patch
(text/x-patch, 491 B)
Index: src/rrd_tool.c
===================================================================
--- src/rrd_tool.c (revision 2118)
+++ src/rrd_tool.c (working copy)
@@ -542,7 +542,7 @@
}
#if defined(HAVE_OPENDIR) && defined(HAVE_READDIR) && defined(HAVE_CHDIR)
if (argc > 1 && strcmp("cd", argv[1]) == 0) {
- if (argc > 3) {
+ if (argc != 3) {
printf("ERROR: invalid parameter count for cd\n");
return (1);
}