@ewen
The man that developed the Smugmug photo sharing/storing website/app had someone reverse engineer his code and patent it, subsequently attempting to charge him a licensing fee to use the software he had personally developed.

It took him several years and (probably) millions of dollars to fight him and eventually win. And nothing the guy did was illegal.