From b914af78366738927b6af79a7a6532b685ac3692 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 24 Oct 2013 07:21:56 -0600 Subject: [PATCH] Telnetd: Missing argument in debug statement can cause crash in certain error conditions. From David Sidrane --- ChangeLog.txt | 3 +++ examples/cc3000/telnetd_driver.c | 2 +- netutils/telnetd/telnetd_driver.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index df258de8c..8c9dd72a7 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -690,4 +690,7 @@ /dev/random (2013-10-20). * apps/examples/cc3000: Extensions and enhancements from David Sidrane (2013-10-23). + * apps/netutils/telnetd/telnetd_driver.c: Missing argument to + debug statement can cause crashes in certain error conditions. + From David Sidrane (2013-10-24). diff --git a/examples/cc3000/telnetd_driver.c b/examples/cc3000/telnetd_driver.c index c7d5c86ca..865dba1d3 100644 --- a/examples/cc3000/telnetd_driver.c +++ b/examples/cc3000/telnetd_driver.c @@ -504,7 +504,7 @@ static int telnetd_close(FAR struct file *filep) ret = unregister_driver(devpath); if (ret < 0) { - nlldbg("Failed to unregister the driver %s: %d\n", ret); + nlldbg("Failed to unregister the driver %s: %d\n", devpath, ret); } free(devpath); diff --git a/netutils/telnetd/telnetd_driver.c b/netutils/telnetd/telnetd_driver.c index 9128ad09b..13d1e00e4 100644 --- a/netutils/telnetd/telnetd_driver.c +++ b/netutils/telnetd/telnetd_driver.c @@ -505,7 +505,7 @@ static int telnetd_close(FAR struct file *filep) ret = unregister_driver(devpath); if (ret < 0) { - nlldbg("Failed to unregister the driver %s: %d\n", ret); + nlldbg("Failed to unregister the driver %s: %d\n", devpath, ret); } free(devpath);