Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Cluster Development (http://www.linux-archive.org/cluster-development/)
-   -   cluster/ccs/lib libccs.c (http://www.linux-archive.org/cluster-development/43537-cluster-ccs-lib-libccs-c.html)

01-21-2008 09:31 PM

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;


All times are GMT. The time now is 03:01 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.