Hacker News new | ask | show | jobs
by zarzavat 1029 days ago
Let’s say I use some code from stack overflow and it turns out to be GPL. Can the owner of the code sue to compel specific performance of the GPL? Probably not, since I can’t be bound be a contract I never even saw, I can be sued for copyright infringement however.
2 comments

No, that's just copyright infringement. You use the license as a contract in order to use the code without infringing on copyright.

If you don't adhere to the conditions in the license, the license is revoked, and you're back to copyright infringement, with all the consequences.

I'd assume you follow Stackoverflow's license here (creative commons). You do follow the necessary attribution requirement that Stackoverflow demands of you when you copy snippets from the site, don't you?

If you're made aware that the code you copied in good faith was not allowed to be granted to you under those terms, you'd probably just lose your right to use the code and nothing more. The person redistributing code under a wrong license is the main culprit, but since they were never allowed to hand out a license, you're screwed because of them. If you choose not to distribute the source code, you must remove it from your product as soon as possible.

Of course, this does assume that the code you copied passes the originality threshold. A simple multiplication or a very basic algorithm can be considered too simple to copyright, and GPL would be powerless.

It's so possible the use of the copyrighted code can be considered fair use. In the USA, Oracle sued Google over some GPLv2 API definition, but Google was ruled not to have to abide by the terms of the GPL license in that case, because of fair use reasons.