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