diff options
author | Richard Levitte <levitte@openssl.org> | 2005-01-12 09:53:20 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2005-01-12 09:53:20 +0000 |
commit | b15a93a9c55c1dd4163eda3d61e090e320e51b8f (patch) | |
tree | 7ea3cde474e82501d68b2f1fa4969a4e824d7ceb /crypto/rand/rand_vms.c | |
parent | d9248e57807fa6f2a4b8d290fc5f60d4ec1c4552 (diff) |
Correct a faulty address assignment, and add a length check (not
really needed now, but may be needed in the future, who knows?).
Diffstat (limited to 'crypto/rand/rand_vms.c')
-rw-r--r-- | crypto/rand/rand_vms.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crypto/rand/rand_vms.c b/crypto/rand/rand_vms.c index 29b2d7af0b..1267a3acae 100644 --- a/crypto/rand/rand_vms.c +++ b/crypto/rand/rand_vms.c @@ -101,11 +101,12 @@ int RAND_poll(void) pitem = item; /* Setup */ - while (pitems_data->length) + while (pitems_data->length + && (total_length + pitems_data->length <= 256)) { pitem->length = pitems_data->length; pitem->code = pitems_data->code; - pitem->buffer = (long *)data_buffer[total_length]; + pitem->buffer = (long *)&data_buffer[total_length]; pitem->retlen = 0; total_length += pitems_data->length; pitems_data++; |