The whole area of copyright is extremely complex. There are so many possibilities that probably the best one can do is to follow what you perceive to be proper for your situation. Usually courts look for previous rulings to help make decisions, but even then, just a single different circumstance can render prior decisions worthless.
And even when you think you have done everything by the book, there is no way of stopping someone of suing or bringing a lawsuit your way. To be honest, the only way to proceed in these matters is go by what you know and have been advised is okay, and then, if need be, let a court rule as to what is legal or not.
If you think you might be doing this a lot or something similiar, spend an hour with a copyright attorney, and see what he/she advises. You'll feel more comfortable in the long run.