 The power may be exercised only to the extent that it is reasonably required for that purpose.This applies where a person is arrested in pursuance of a warrant of arrest, commitment or detention issued in proceedings for or in connection with any criminal offence.An authorised officer may search the arrested person, if he has reasonable grounds for believing that the arrested person may present a danger to himself or others.