Modern firearms propellant has O2 locked up in it already.
The oxygen is locked in to the chemical composition of the propellant.
The reason the O2 is chemically in the propellant is the combustion of the propellant needs to be too fast to get O2 from around the cartridge. Also a cartridge would not contain enough air space inside to provide the O2 required for such an energetic explosion.
A Glock is known for firing underwater, why not space?