[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] cluster/ccs/lib libccs.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Changes by:	jbrassow sourceware org	2008-01-21 22:31:54

Modified files:
	ccs/lib        : libccs.c 

Log message:
	- ccs library now checks for bad file descriptors as input

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/ccs/lib/libccs.c.diff?cvsroot=cluster&r1=1.14&r2=1.15

--- cluster/ccs/lib/libccs.c	2008/01/07 05:52:28	1.14
+++ cluster/ccs/lib/libccs.c	2008/01/21 22:31:42	1.15
@@ -409,6 +409,9 @@
 
   ENTER("ccs_disconnect");
 
+  if (desc < 0)
+	  return -EINVAL;
+
   if(!(buffer = malloc(512))){
     error = -ENOMEM;
     goto fail;
@@ -452,6 +455,9 @@
 
   ENTER("_ccs_get");
 
+  if (desc < 0)
+	  return -EINVAL;
+
   if(!(buffer = malloc(512))){
     error = -ENOMEM;
     goto fail;
@@ -535,6 +541,9 @@
 
   ENTER("ccs_get_state");
 
+  if (desc < 0)
+	  return -EINVAL;
+
   if(!(buffer = malloc(512))){
     error = -ENOMEM;
     goto fail;
@@ -594,6 +603,9 @@
 
   ENTER("ccs_set_state");
 
+  if (desc < 0)
+	  return -EINVAL;
+
   if(!(buffer = malloc(512))){
     error = -ENOMEM;
     goto fail;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]