gas fireplace vent

This gas fireplace (which I was unable to turn on) had this single wall rusty vent pipe. I know little about this setup with the pipe in the open. I dont know how hot the exhaust gets in a gas fireplace, nor clearances. I have researched clearance charts but theres no end to influencing details which seem to include everything in the house. The pipe is within inches of an unknown wall covering, appears to be something akin to the old Z brick but feels flimsy (knuckle knock test). At least, said I, it should be replaced due to the rust which will result in pin holes and the possibility of back drafting carbon monoxide. This was besides recommending an inspection by somebody with expertise in gas fireplaces. Does this look ok, providing rusty components are replaced? Or an absolute no-no for some reason
thanks
mike in MN

DAN.jpg

DAN_5333.jpg

Single wall pipe venting a gas appliance requires 6" clearance from combustibles.
If the pipe is rusted and has holes in it, don’t even think about trying to turn on the appliance. B vent (double wall gas only vent) requires 1" clearance. If those ‘bricks’ are combustible there should be a thimble or B vent where the single wall enters the wall.

Your pic is too small to see anything useful, but that looks like about a 50 year old space heater, which is probably no longer considered safe. Check for things like a pilot safety that turns off the gas valve if the pilot light goes out.
Having said that, grandma survived these things just fine, but she was a pretty sharp old gal.