Appeal from a judgment of the County Court of Albany County (Breslin, J), rendered July 17, 2008, convicting defendant upon his plea of guilty of the crime of criminal possession of a controlled substance in the second degree.
Defendant pleaded guilty to the reduced charge of criminal possession of a controlled substance in the second degree, in full satisfaction of a five-count indictment. Pursuant to the terms of the plea agreement, defendant waived his right to appeal and was sentenced to a prison term of seven years, to be followed by five years of postrelease supervision. Defendant now appeals.
We affirm. Defendant’s waiver of the right to appeal precludes his contention that he was denied the effective assistance of counsel, except insofar as it relates to the voluntariness of his guilty plea (see People v Anderson, 63 AD3d 1191, 1193 [2009], lv denied 13 NY3d 794 [2009]; People v Perry, 50 AD3d 1244, 1245 [2008], lv denied 10 NY3d 963 [2008]). Defendant’s argument on appeal that counsel failed to challenge the validity of a search warrant does not implicate the voluntariness of his plea and, therefore, is precluded (see People v McDuffie, 43 AD3d 559, 560 [2007], lv denied 9 NY3d 992 [2007]). In any event, given the favorable plea agreement negotiated by counsel and
Mercure, J.P., Spain, Rose and Stein, JJ., concur. Ordered that the judgment is affirmed.