Will my math grades hurt my chances at CAS CS?

I want to major in some sort of computer science and I am interested in applying for CAS. I love programming, and I am very good at it - but as far as math goes, I’m pretty average, and perhaps below average for someone who plans to pursue CS and wants to apply to Cornell. My freshman year, (I was in Hon alg II) I got a B overall average, one of two Bs (the other one was English) for freshman year. Sophomore year (hon Precalc) I got a B average again…and this time it was the only B I got for the year (I managed to get a A- in English). I also got a 740 on Math II SAT, which I plan to retake.
I know CS-kids are really competitive, and since math is so heavily associated with CS I’m afraid that these grades will give a negative impression to admissions officers. My cousin says my chances could be really hurt, and that kind of bums me out as I absolutely love Cornell and it is one of my dream schools. The best thing I can do now is try to get an A average in AP Calculus(I’m a junior now) and retake Math II to raise my score. Even then, do you think my grades give me a disadvantage and what can I do to improve my chances?

It probably won’t hurt your chances too much if the rest of your stats is good. If you are dead set on attending Cornell then just apply ED.

You could apply with an undeclared major.

Like @Saugus said, you can definitely apply Undecided to CAS. I did, and right now I am planning on graduating from Cornell with a CS degree. Admissions probably won’t be as picky on a single subject, and will look at the bigger picture, which is more to your advantage.
My own advice: try to boost your grades as much as possible and also try to think about another subject that interests you (probably something that links well with computer science in practice).
The essay for CAS is normally about discussing passions in multiple academic areas, so going Undecided and exploring topics that combine with CS would help you craft your application. Your grades are only a portion of what admissions looks at.