views:

205

answers:

2

Has this ever happened to you? What was the bug or situation which was ended up becoming a feature? What was your experience with this?

+1  A: 

Kind of. I was writing some kernel code that under some cases dereferenced the NULL at the end of a linked list. (In kernel mode this did not cause a segfault.)

I discovered this while trying to find a bug, and was about to fix it when I realised that it didn't cause any harm (it was only a read, not a write, and did not result in any unwanted effects). Furthermore, avoiding the NULL dereference would result in a minor performance penalty. So I left it there.

Artelius
I know this post is ancient but... you might be interested in http://blog.ksplice.com/2010/04/exploiting-kernel-null-dereferences, which explains how a very minor variation of this bug can become a major security breach.
David Given
@David: Thanks, but not relevant to my case. This was not Linux, and there actually was kernel data mapped into the NULL page. But since the data was read and then discarded it didn't matter anyhow.
Artelius
+1  A: 

I am working for an Insurance Company and once I was working on a quote and buy website. There were two payment options.

  1. Creadit Card (Full Payment) - 10% Discount
  2. Direct Debit (monthly payment)

But paying via direct debit was not easy. In order to stop frauds the customer has to pay 2 months advance premium through credit card and then pay the rest 10 via Direct Debit.These were two entire process and the client wanted the project ASAP and I made a mistake of collecting 12 months premium via CC (instead of 2 months) and then activate 10 months via Direct Debit.

During Testing with the payment gateway this was found out but business,after seeing this bug, wanted to changed the design a little bit and thought about providing discount if they paid via CC. So instead of 2 months (by default) we had dropdown having values 2,4,6,12 months and discounts were given based on users choice.

Shoban