Some rifles, such as a AK 47, can have a collapsible stock making it shorter. I have worked at plants where it would be easy to sneak a short rifle in. It could be under a coat or in a cardboard box. Once it is in a locker, no one could see it.
This article says it was a handgun.