hi, when building parrot it reported a warning about some variable "string"
in string.c
When checking out, I saw this:

static const char *
nonnull_encoding_name(STRING *s)
{
    char *string;
    if (!s)
        strcpy(string, "null string");
    else
        strcpy(string, s->encoding->name);

    return string;
}

Can this be right? I thought that the first argument to strcpy needs to
point to some memory, but "string" (which really should be renamed I think,
as it might cause trouble when compiling it using a C++ compiler) is not
even initialized.

kjs

Reply via email to