Re: Buffer Overflow

From: Bjorn Reese (breese@mail1.stofanet.dk)
Date: 04/06/03


Date: Sun, 06 Apr 2003 09:46:51 +0000
From: Bjorn Reese <breese@mail1.stofanet.dk>

Jack wrote:
>
> Hey Guys I need your point of view in terms of buffer overflow. These
> are the steps i take while transfering data from one socket to the
> other.
> 1) The first 2 bytes of the message tell me the length of the buffer.
> 2) I malloc my buffer for that size, memset the buffer
> 3) If the data size increases my MAX_LIMIT i disregard the message.

Is the socket closed after you disregard the message? If not, how
do you know where in the socket stream the next valid message starts?



Relevant Pages

  • MCBSP EDMA problem on DSP 6482
    ... transfering data from a buffer to a mcbsp port which forwards it to PCM ... where it read by another edma channeland transferred onto a buffer. ...
    (comp.dsp)
  • Re: Buffer Overflow
    ... >are the steps i take while transfering data from one socket to the ... >1) The first 2 bytes of the message tell me the length of the buffer. ... so there's no need to memset it. ...
    (comp.unix.programmer)
  • Buffer Overflow
    ... Hey Guys I need your point of view in terms of buffer overflow. ... are the steps i take while transfering data from one socket to the ... The first 2 bytes of the message tell me the length of the buffer. ...
    (comp.unix.programmer)
  • Re: Communication speed between blocking call and non blocking cal
    ... You could use event based notification, ... When you use nonblocking I/O, the system may have to perform extra buffering ... data buffer until you say that you are done with it. ... I checked default socket buffer ...
    (microsoft.public.win32.programmer.networks)
  • Re: strange select() behavior
    ... sharing descriptors, might fill that interface buffer. ... What do you do when a blocking socket operation returns ENOBUFS? ... because it's a semantic change. ...
    (comp.unix.programmer)