Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2005:
[Freeciv-Dev] Re: (PR#12692) Make packet handling more robust
Home

[Freeciv-Dev] Re: (PR#12692) Make packet handling more robust

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: i-freeciv-lists@xxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#12692) Make packet handling more robust
From: "Benoit Hudson" <bh@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 29 Mar 2005 09:46:51 -0800
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12692 >

On Tue, Mar 29, 2005 at 09:24:50AM -0800, Raimar Falke wrote:
> +  /*
> +   * At this point the packet is a plain uncompressed one. These have
> +   * to have to be at least 3 bytes in size.
> +   */

Where does the magic number 3 come from?  Header + 2 bytes data?  ...?

3 also seems to pop up earlier in the function, uncommented:
  if (pc->buffer->ndata < 3) {

Probably we should #define something.

        -- Benoît





[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: (PR#12692) Make packet handling more robust, Benoit Hudson <=