Wikipedia appears to contradict itself. It says the producers of the film Stalag 17 sued the producers of the TV show Hogan’s Heroes and lost. However, it goes on to cite Andy Rooney as claiming that the writers of the stage play Stalag 17 sued the producers of the TV show and won. Both facts could be true if there were two suits, I suppose.
My web searches turn up only unsupported claims one way or the other. A search of Google Books for {“Stalag 17” “Hogan’s Heroes” infringement} turns up a lot of respectable looking hits, but they’re in snippet view at best and I can’t make much of the results.
On a tangent: I watched the movie last night, and I was constantly distracted by Hoffy’s appearance and especially his voice. He was terribly familiar, but I couldn’t quite place him. It turns out he (Richard Erdman) also plays Leonard, the old guy on Community.