[Freeciv-Dev] Re: (PR#3706) append the capstring
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Wed, Mar 12, 2003 at 03:11:11PM -0800, Jason Short wrote:
>
> capability.c provides the code to handle capabilities; these are used
> for savegames, tilespec and specfiles, and network versioning. capstr.c
> just provides the network versioning capstring.
my point is why do we have two different files when one would do just
fine...
> Thus the append_capability function should go into capability.c, I would
> think. Unfortunately, this is more complicated since other users don't
> have writable capstrings. So perhaps it is not worthwhile.
yes, especially since the capability string is a statically defined
variable.
> It does look like you don't handle the error case properly. What
> happens if the capstring buffer is overflowed? Will freeciv just break?
> Even in the second patch, when you return FALSE to indicate error, it
> still leaves you with an incorrect capstring.
mystrlcat prevents an buffer overflow, it simply cuts off the string.
Freeciv won't break, the client simply won't recieve the looked-for string,
and will probably act as if the capability doesn't exist.
This was meant to be a simple little patch. What would you propose as a
solution?
-mike
- [Freeciv-Dev] (PR#3706) append the capstring, Mike Kaufman, 2003/03/12
- Message not available
- [Freeciv-Dev] Re: (PR#3706) append the capstring, Jason Short, 2003/03/12
- [Freeciv-Dev] Re: (PR#3706) append the capstring,
Mike Kaufman <=
- [Freeciv-Dev] Re: (PR#3706) append the capstring, Jason Short, 2003/03/12
- [Freeciv-Dev] Re: (PR#3706) append the capstring, Mike Kaufman, 2003/03/13
- [Freeciv-Dev] Re: (PR#3706) append the capstring, Jason Short, 2003/03/21
- [Freeciv-Dev] Re: (PR#3706) append the capstring, Mike Kaufman, 2003/03/21
- [Freeciv-Dev] Re: (PR#3706) append the capstring, Jason Short, 2003/03/21
|
|