[CF-Devel] Ready to start contributing
crossfire-devel at archives.real-time.com
crossfire-devel at archives.real-time.com
Sun Oct 10 18:29:26 CDT 2004
Andreas Kirschbaum wrote:
>
But I could not find out how to change the state of the sourceforge
>
tracker items. Should I just add a comment to that tracker item (and
>
wait for someone else to change the state) or did I miss anything?
I've updated your permissions so I think you should be able to update the bug
and patch statuses.
>
>
>
Basically, the problem was a statement like
>
>
sprintf(buf, "...%s...", buf)
>
>
That is, the destination string was part of the source string. Doing a
>
grep for all s[n]printf calls in the code revealed some more statements
>
like
>
>
sprintf(buf, "%s...", buf)
>
>
in readable.c. Should I change these statements as well? (I ask this
>
because these statements may work in practice, but the Ansi-C standard
>
says "If copying takes place between objects that overlap, the behavior
>
is undefined.")
They should get changed. Ideally, where possible, they should all get changed
to snprintf as well (the cases where this is not applicable is when a string is
passed in of unknown size). However, even then, using snprintf and passing in
BIG_BUF or the like might still be better than nothing.
_______________________________________________
crossfire-devel mailing list
crossfire-devel at lists.real-time.com
https://mailman.real-time.com/mailman/listinfo/crossfire-devel
More information about the crossfire
mailing list