gmnisrv: fix security vulnerability
authored by Nikolay Korotkiy and committed by ehmry 4 years ago c79e3ded ad256a07