Most of the time the insect problem comes from within the flour itself, rather than from the outside. It can be a roll of the dice if you will have buggy/wormy flour after much more than a month of storage. The key is to keep the flour as cool as possible. I've got a small chest freezer in my garage that I use for storing things that I inherit, such as extra flour, fish from a neighbor's successful fishing trip, surplus garden vegetables, you name it. It pays for itself in savings, and when I'm not using it, I just unplug it.
Tom Lehmann/The Dough Doctor