Defendant was found guilty, after a jury trial, of the crime of sodomy in the second degree, and on November 28, 1958 was sentenced as a second felony offender, he having previously been convicted of another felony. The judgment of conviction was affirmed by the Appellate Division of the Supreme Court, Fourth Department, on June 10, 1960 (People v. Eastman, 11 A D 2d 751). Thereafter defendant sought to vacate this judgment of conviction through an application for the issuance, of a writ of error coram, nobis; said application was denied and such denial affirmed by the Appellate Division of the Supreme Court, Fourth Departments On March 30, 1961 People v. Randall (9 N Y 2d 413) was decided, and in April, 1962 the Penal Law was amended making the acts of defendant a felony; under the law as it existed at the time of the commission of the acts complained of by defendant he would have.been guilty of no more than a misdemeanor, not a felony (People v. Randall, supra).
The District Attorney, with commendable candor, agrees with defendant that upon the proof submitted on the trial, and under the holding of the 'Randall case (supra), the greatest degree of any criminal offense, committed by the defendant was that of a misdemeanor. It seems, therefore, that defendant was convicted of a crime for which he could not have been legally convicted, and that the. sentence imposed was an illegal sentence. It may be that, an application for. a writ of habeas corpus would more nearly, fit the facts in this case; it might even be that an application for resentence would be in order. , Defendant has already served more than six years of a sentence which the District *675Attorney agrees was an illegal one, and although it has been held (e.g., People v. Howard, 12 N Y 2d 65) that coram nobis cannot be used to take the place of an appeal, this court must be, and is, able to correct mistakes made in its judgments. In my opinion, defendant has been deprived of due process of law, and the facts of this case constitute “ exceptional circumstances where a writ of error coram nobis may be used even though an appeal from the judgment of conviction has been previously taken. (People v. Silverman, 3 N Y 2d 200, 202; People v. Shapiro, 3 N Y 2d 203, 205.)
Since a question of law only is involved, this court vacates the judgment of conviction entered herein and directs that defendant appear before this court, at the Hall 'of Justice, in the City of Rochester^ Monroe County, New York, on the 23rd day of Juno, 1965, at 9:30 o’clock in the forenoon of that day, for such further proceedings in this matter as are not inconsistent with this decision.