A bullet will lose sufficient velocity so that it no longer lethal relatively quickly. As an example we can use FBI specs for maximum range of the NATO standard issue M855 cartridge for 5.56mm , which is 3600 yards. Ballistics show a trajectory with 2200 foot drop at that range and a final velocity of 490fps with a retained energy of only 33ft/lbs (about 3% of muzzle energy). To attain impact at 3600 yards requires the rifle to be elevated at about 11 degrees. In reality, the bullet is likely to lose enough rotational velocity that it will destabilize much earlier, which will even more rapidly decrease velocity and power.
So, put simply, for this cartridge shooting in the air at an angle greater than 11 degrees relative to the horizon would not be particularly dangerous.