regneq / projecteqemu

Automatically exported from code.google.com/p/projecteqemu
1 stars 0 forks source link

ReaderLoop Buffer Size Check #26

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Purpose of code changes on this branch:

Assure that the incoming buffer contains an opcode to analyze.

I am just putting + next to the diff.

EQStreamFactory::ReaderLoop

+               if ( length < 2 )
+                   continue;

                char temp[25];
                sprintf(temp,"%u.%d",ntohl(from.sin_addr.s_addr),ntohs(from.sin_port));
                MStreams.lock();

                if ((stream_itr=Streams.find(temp))==Streams.end()) {
                    if (buffer[1]==OP_SessionRequest) {

Original issue reported on code.google.com by dmic...@gmail.com on 6 Apr 2009 at 7:10

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks again :)

Original comment by DerisionEQ on 6 Apr 2009 at 7:29

GoogleCodeExporter commented 8 years ago
Committed in Rev410.

Original comment by DerisionEQ on 6 Apr 2009 at 7:51