> Except that later there is "name = buf;" with name staying live out of this if
> scope. So this change is not correct. It would be better to move it out up a
> bit.
>
> Best regards,
>
> Thomas

Yes, you are right, the patch is wrong.

What about removing char buf[32] and replacing
                strcpy(buf, "__bound_");
                strcat(buf, name);
                name = buf;

with

                if (strlen(name) + strlen("__bound_") <
(unsigned)STRING_MAX_SIZE) {
                    memmove(name + strlen("__bound_"), name, strlen(name));
                    memcpy(name, "__bound_", strlen("__bound_"));
                }

Is it overkill ?

Regards

Fabio

_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

Reply via email to