Officer was given a tip about possible drugs being on inmate. While inmate was being pat frisked he came off the wall and punched Officer in the face. A response was called and inmate was subdued. Inmate was found to be in possession of marijuana and a razor weapon. CO was treated at the facility and remained on duty.