summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2012-12-14 12:40:27 -0600
committerMike Christie <michaelc@cs.wisc.edu>2012-12-14 12:40:27 -0600
commita7afdf46c3193eb102cc6ec2a3b61e8d36794437 (patch)
treef486700738dc5e7ac002656fe473c2b9d53c0f91 /include
parentc34e0bdcbafdb6f9304e1474d51fe1c789c5dea2 (diff)
downloadopen-iscsi-a7afdf46c3193eb102cc6ec2a3b61e8d36794437.tar.gz
iscsi tools: fix get_random_bytes error handling
Bug report from Rahul: There seems to be a bug in function get_random_bytes(). I reported this earlier as well but somehow it didn't appear here. get_random_bytes(unsigned char *data, unsigned int length) { long r; unsigned n; int fd; fd = open("/dev/urandom", O_RDONLY); while (length > 0) { if (!fd || read(fd, &r, sizeof(long)) != -1) <<<< the condition is incorrect
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions