Section 360(5) in The Code of Criminal Procedure, 1973
(5)When an order has been made under this section in respect of any offender, the High Court or Court of Session may, on appeal when there is a right of appeal to such Court, or when exercising its powers of revision, set aside such order, and in lieu thereof pass sentence on such offender according to law :Provided that the High Court or Court of Session shall not under this sub-section inflict a greater punishment than might have been inflicted by the Court by which the offender was convicted.