— Appeal from a judg*1219ment of the Supreme Court, Erie County (Deborah A. Haendiges, J.), rendered August 23, 2011. The judgment convicted defendant, upon his plea of guilty, of attempted murder in the second degree (two counts).
It is hereby ordered that the judgment so appealed from is unanimously affirmed.
Memorandum: On appeal from a judgment convicting him upon his plea of guilty of two counts of attempted murder in the second degree (Penal Law §§ 110.00, 125.25 [1]), defendant contends that the waiver of the right to appeal is not valid and challenges the severity of the sentence. Although the record establishes that defendant knowingly, voluntarily and intelligently waived the right to appeal (see generally People v Lopez, 6 NY3d 248, 256 [2006]), we conclude that the valid waiver of the right to appeal does not encompass his challenge to the severity of the sentence because the record establishes that defendant waived his right to appeal before Supreme Court advised him of the potential periods of imprisonment that could be imposed (see People v Mingo, 38 AD3d 1270, 1271 [2007]; see generally People v Lococo, 92 NY2d 825, 827 [1998]). Nevertheless, on the merits, we conclude that the sentence is not unduly harsh or severe. Present — Smith, J.P, Fahey, Garni, Sconiers and Valentino, JJ.