[Freeciv-Dev] Re: (PR#3706) append the capstring
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Mike Kaufman wrote:
> On Fri, Mar 21, 2003 at 03:11:57PM -0800, Jason Short wrote:
>
>>Actually, I think that
>>
>>(1) We need to more rigorously check the capstring length, particularly
>>in init_our_capability(). One of these days (probably before the next
>>release :-) we will overrun MAX_LEN_CAPSTR - and when we do it would be
>>nice if things didn't just *silently* break.
>>
>>(2) append_capability shouldn't export the problem by returning a
>>boolean. If the capstring does overflow it's because of a bug (that
>>will affect everyone), and should be fixed (probably just by upping the
>>protocol version #).
>
>
> I can see that you didn't actually test this. This won't work cause die
> requires freelog which hasn't been inited yet... this is why I exported the
> 'problem'.
Indeed.
I still believe the above two things, though. It is easy to use printf
instead of freelog.
Also, I note that passing a very long FREECIV_CAPSTR (or whatever)
environment variable can trigger the die() call. Which means it
shouldn't be a die anyway (this is reserved for code errors).
Sigh...
jason
- [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, 2003/03/12
- [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 <=
|
|