mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-08 17:42:12 +03:00
[BZ #6007]
2008-03-31 Ulrich Drepper <drepper@redhat.com> [BZ #6007] * string/strfry.c: Handle empty strings again.
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
2008-03-31 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
[BZ #6007]
|
||||||
|
* string/strfry.c: Handle empty strings again.
|
||||||
|
|
||||||
2008-03-30 Ulrich Drepper <drepper@redhat.com>
|
2008-03-30 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
[BZ #5443]
|
[BZ #5443]
|
||||||
|
@@ -26,7 +26,6 @@ strfry (char *string)
|
|||||||
{
|
{
|
||||||
static int init;
|
static int init;
|
||||||
static struct random_data rdata;
|
static struct random_data rdata;
|
||||||
size_t len, i;
|
|
||||||
|
|
||||||
if (!init)
|
if (!init)
|
||||||
{
|
{
|
||||||
@@ -37,8 +36,9 @@ strfry (char *string)
|
|||||||
init = 1;
|
init = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
len = strlen (string) - 1;
|
size_t len = strlen (string);
|
||||||
for (i = 0; i < len; ++i)
|
if (len > 0)
|
||||||
|
for (size_t i = 0; i < len - 1; ++i)
|
||||||
{
|
{
|
||||||
int32_t j;
|
int32_t j;
|
||||||
__random_r (&rdata, &j);
|
__random_r (&rdata, &j);
|
||||||
|
Reference in New Issue
Block a user