Microsoft just doesn’t get Security – NOT!

I was reading Robert Scoble’s post on “Longhorn Myths”, and I noticed this comment from “Dave” in his comments thread: Most outlandish Longhorn myth? I mean this with all due respect, and say it with complete sincerity…. it will be one that MS will in fact say: that Longhorn will be a very secure sytstem….


Software archaeology

There are times that I think my job is the same as an archeologist.  Rick touched on this a bit on his “Anatomy of a Software Bug” post (an excellent read, btw, if you haven’t already seen it). Code, like people, gets old.  And, just like old people, old code tends to be pretty brittle….


Managed Code can’t have memory leaks, right?

One of the axioms of working with managed code is that since you’re using managed code, you don’t have to worry about memory leaks. This can’t be further from the truth.  It’s totally possible to write code that leaks memory, even with managed code. The trick is when you realize that your code can leak,…


Should I check the parameters to my function?

I just had an interesting discussion with one of the testers in my group. He had just finished filing a series of bugs against our components because they weren’t failing when he passed bogus pointers to the API.  Instead, they raised a 0xC0000005 exception and crashed his application. The APIs did fail if he passed…


What assembly language DOES your code generate?

Pat Niemeyer had a fascinating comment in my article about programmers knowing roughly what assembly language their code generates: Your example serves to demonstrate that developers should, under normal circumstances, *not* care about low level code or performance issues… They should just do the “right thing” where that is usually the simplest and most staightforward…


What’s wrong with this code, part 2 (the answers)

So here are the intentional bugs in the “what’s wrong with this code, take two” post: The first two bugs are quite straightforward, but insidious.  I can’t think of the number of times I’ve seen code that gets this wrong.  Reading (or writing) data from (to) a socket is like putting your mouth on the…


What’s wrong with this code, take two…

Well, my last “What’s wrong with this code” post was such a rollicking good success, I figured I’d do it one more time (I’m SUCH a glutton for punishment). This time, I not only bench checked the code, but I verified that it actually worked (which is more than I can say for the last…


Mea Culpa (it’s corrections time).

One of the rules in Tim Bray’s version of Sun’s blogging policy is “Write What You Know”. Well, I should have listened to this when I posted my 3rd post, “So why does NT require such a wonking great big paging file on my machine”.  I’ve since been gently corrected by the guys on the…


Remember the Giblets!

I was planning on writing something else today, but Raymond’s post about a buffer overflow in the LHA libraries convinced me to write this up. Yesterday afternoon, I spent a really quite enjoyable 4 hours sitting in listening to Michael Howard give a refresher course in security to about a thousand product group developers. Most,…


Measure Twice, Optimize Once

When I move offices, it takes 16 moving boxes to hold my junk (I‘ve got a lot of it).  One reason is because of all the books I’ve collected over the years. Many of them were read once and discarded, others are treasures I come back to time and time again.  One of the ones…