The Code of Criminal Procedure, 1973 (CrPc)
464. Effect of omission to frame, or absence of, or error in, charge.
(1) No finding sentence or order by a court of competent jurisdiction shall be deemed invalid merely on the ground that no charge was framed or on the ground of any error, omission or irregularity in the charge including any misjoinder of charge, unless, in the opinion of the court of appeal, confirmation or revision, a failure of justice has in fact been occasioned thereby.
(2) If the court of appeal, confirmation or revision is of opinion that a failure of justice has in fact been occasioned, it may-
(a) In the case of an omission to frame a charge, order that a charge be framed and that the trial be recommenced from the point immediately after the framing of the charge.
(b) In the case of an error, omission or irregularity in the charge, direct a new trial to be had upon a charge framed in whatever manner it thinks fit:
Provided that if the court is of opinion that the facts of the case are such that no valid charge could be preferred against the accused in respect of the facts proved, it shall quash the conviction.