from a judgment of the County Court of Schenectady County (Giardino, J.), rendered January 31, 2006, convicting defendant upon his plea of guilty of the crime of assault in the second degree.
Defendant was charged in an indictment with multiple crimes following a domestic dispute with his wife. In full satisfaction of the indictment, he pleaded guilty to assault in the second degree and executed a written waiver of his right to appeal. In accordance with the plea agreement, he was sentenced as a second felony offender to four years in prison to be followed by five years of postrelease supervision. Defendant appeals.
Preliminarily, we note that defendant’s challenge to the legality of the sentence survives his waiver of the right to appeal (see People v Dukes, 14 AD3d 732, 733 [2005], lv denied 4 NY3d 885 [2005]). We find no merit to his claim that the five-year period of postrelease supervision was illegally imposed. Defendant was sentenced under Penal Law § 70.06 (6) (c) as a second felony offender upon his conviction of a class D violent felony. As such, *488he was subject to the general five-year period of postrelease supervision set forth in Penal Law § 70.45 (2) and not the IV2to-3-year period applicable to defendants sentenced under Penal Law § 70.02 (3) (see Penal Law § 70.45 [2] [e]; see e.g. People v Chestnut, 18 AD3d 965, 966 [2005]).
Cardona, RJ., Crew III, Carpinello, Mugglin and Rose, JJ., concur. Ordered that the judgment is affirmed.