September 2007 Entries

I am receiving these spams where there is no message body or subject. Looks like the application that they have used for mass e-mailing is suppose to replace the %MESSAGE_BODY placeholder with a text that the spammer supplying.

06/03/2007 (13:53 GMT  +03:00)
Content-Type: text/html

Looks like, they've forgot to do it. Oh well, another garbage down the internet pipe...

There is a bug in this code. Can you spot it?


private string ReceiveLine()
    const int bufferLength=1024;
    byte[] buffer=new byte[bufferLength+1];    // extra char for null terminator
    StringBuilder message=new StringBuilder(bufferLength);
    int bytesRead;

        bytesRead=socket.Receive(buffer, bufferLength, 0);
        if (bytesRead==0)
        // add null terminator

// conver char array to string message.Append(Encoding.ASCII.GetChars(buffer, 0, bytesRead)); if (buffer[bytesRead-1]==10) break; } string tmp=message.ToString(); if(tmp.StartsWith(POS_STAT_IND)==false) throw new Exception("Received negative response from POP3 server"); return tmp; }


About me

Hi, my name is Gurkan Yeniceri. I am a software engineer with 8 years of experience in both public and private sectors. I have been generally writing about software engineering and Microsoft technologies since March 2005 on this site.
View Gurkan Yeniceri's profile on LinkedIn


If you would like to contact with me you can use the contact page here. I will try to respond it in a timely manner (I will try my best). You can also contact with me via Microsoft Live Messenger with the address gyeniceri {AT} hotmail {DOT} com.
If you are one of my Turkish readers, you may want to visit my Turkish blog here.

If you would like to read my site with an RSS reader like RSS Bandit, you may want to use to subscribe.

RSS 2.0


Bookmark this site digg NewsVine YahooMyWeb Reddit Spurl TailRank BlinkList Furl Shadows blogmarks
    This is a Flickr badge showing public photos from gurkanyeniceri. Make your own badge here.
    There are 133 posts and 88 comments on this site. Other sites also linked it 7 times.