summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src/crypto/rand/rand_vms.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libssl/src/crypto/rand/rand_vms.c')
-rw-r--r--lib/libssl/src/crypto/rand/rand_vms.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libssl/src/crypto/rand/rand_vms.c b/lib/libssl/src/crypto/rand/rand_vms.c
index 29b2d7af0b0..1267a3acae7 100644
--- a/lib/libssl/src/crypto/rand/rand_vms.c
+++ b/lib/libssl/src/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++;