From: Petter R. <pe...@us...> - 2014-01-11 06:45:47
|
Update of /cvsroot/ipmitool/ipmitool/lib In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv17930/lib Modified Files: helper.c Log Message: Check return value from open() in ipmi_start_daemon() (Coverity CID CID 1148983). Index: helper.c =================================================================== RCS file: /cvsroot/ipmitool/ipmitool/lib/helper.c,v retrieving revision 1.52 retrieving revision 1.53 diff -C2 -d -r1.52 -r1.53 *** helper.c 17 Dec 2013 04:53:20 -0000 1.52 --- helper.c 11 Jan 2014 06:45:44 -0000 1.53 *************** *** 45,48 **** --- 45,49 ---- #include <fcntl.h> #include <errno.h> + #include <assert.h> #if HAVE_CONFIG_H *************** *** 664,670 **** } ! open("/dev/null", O_RDWR); ! dup(0); ! dup(0); } --- 665,672 ---- } ! fd = open("/dev/null", O_RDWR); ! assert(0 == fd); ! dup(fd); ! dup(fd); } |