[rygel] core: Check Host arguments in EneergyManagement
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core: Check Host arguments in EneergyManagement
- Date: Thu, 13 Nov 2014 22:07:23 +0000 (UTC)
commit b0e5f7109101b9317af564afff8571af17c5e2a1
Author: Parthiban Balasubramanian <p balasubramanian cablelabs com>
Date: Fri Aug 15 20:19:35 2014 -0600
core: Check Host arguments in EneergyManagement
Fixed Host argument check before executing Ping, NSLookup, Traceroute
src/librygel-core/rygel-basic-management.vala | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/src/librygel-core/rygel-basic-management.vala b/src/librygel-core/rygel-basic-management.vala
index 3916aac..2b2966e 100644
--- a/src/librygel-core/rygel-basic-management.vala
+++ b/src/librygel-core/rygel-basic-management.vala
@@ -251,6 +251,12 @@ public class Rygel.BasicManagement : Service {
typeof (uint),
out dscp);
+ if (host == "") {
+ message ("Ping action : Host is empty !");
+ action.return_error (402, _("Invalid argument"));
+ return;
+ }
+
var ping = new BasicManagementTestPing (host,
repeat_count,
interval_time_out,
@@ -337,6 +343,12 @@ public class Rygel.BasicManagement : Service {
typeof (uint32),
out interval_time_out);
+ if (hostname == "") {
+ message ("NSLookup action : Host is empty !");
+ action.return_error (402, _("Invalid argument"));
+ return;
+ }
+
var nslookup = new BasicManagementTestNSLookup (hostname,
dns_server,
repeat_count,
@@ -412,6 +424,12 @@ public class Rygel.BasicManagement : Service {
typeof (uint),
out dscp);
+ if (host == "") {
+ message ("Traceroute action : Host is empty !");
+ action.return_error (402, _("Invalid argument"));
+ return;
+ }
+
var traceroute = new BasicManagementTestTraceroute (host,
wait_time_out,
data_block_size,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]