Many years ago I had a after school job working at the local newspaper office. They used some very expensive and somewhat quirky accounting software. It turned out to have a hard coded(!) percentage baked into the binary for the country's sales tax rate when issuing invoices.
Of course the government eventually decided to change that rate, and it sounded like the vendor wasn't going to be able to get them upgraded to a corrected version in time. I overheard the discussion and offered to try and help by seeing if I could hack in a fix. Rather surprisingly they agreed, and after a bit of debugging I found the problem and patched the binary. It did the trick and they successfully used that patched version for a couple of weeks until they got their upgrade.
Of course the government eventually decided to change that rate, and it sounded like the vendor wasn't going to be able to get them upgraded to a corrected version in time. I overheard the discussion and offered to try and help by seeing if I could hack in a fix. Rather surprisingly they agreed, and after a bit of debugging I found the problem and patched the binary. It did the trick and they successfully used that patched version for a couple of weeks until they got their upgrade.