Re: Buffer Overflow
From: Bjorn Reese (breese@mail1.stofanet.dk)
Date: 04/06/03
- Next message: Eric Smith: "Re: timeout on read command"
- Previous message: Bjorn Reese: "Re: Buffer Overflow"
- In reply to: Jack: "Buffer Overflow"
- Next in thread: Jack: "Re: Buffer Overflow"
- Reply: Jack: "Re: Buffer Overflow"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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?
- Next message: Eric Smith: "Re: timeout on read command"
- Previous message: Bjorn Reese: "Re: Buffer Overflow"
- In reply to: Jack: "Buffer Overflow"
- Next in thread: Jack: "Re: Buffer Overflow"
- Reply: Jack: "Re: Buffer Overflow"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|