just return if we are asked for 0 bytes
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||
* All rights reserved.
|
||||
*
|
||||
* Portions Copyright (c) 2009 Apple Inc. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
@@ -95,6 +97,8 @@ RAND_seed(const void *indata, size_t size)
|
||||
int
|
||||
RAND_bytes(void *outdata, size_t size)
|
||||
{
|
||||
if (size == 0)
|
||||
return 1;
|
||||
init_method();
|
||||
return (*selected_meth->bytes)(outdata, size);
|
||||
}
|
||||
|
Reference in New Issue
Block a user