Section 122(3) in The Code of Criminal Procedure, 1973
(3)Such Court, after examining such proceedings and requiring from the Magistrate any further information or evidence which it thinks necessary, and after giving the concerned person a reasonable opportunity of being heard, may pass such order on the case as it thinks fit :Provided that the period (if any) for which any person is imprisoned for failure to give security shall not exceed three years.