If your visa expires while you are in the United States, then you may not have anything to worry about.
If the CBP officer at the port of entry admitted you into the United States for a specific period of time, then the officer will have taken note of the expiry date on your visa. As long as you are leaving the United States on the date you told the CBP officer, you should not get into trouble.
Remember to keep your admission stamp or paper Form I-94 documents because they act as the official record of your permission to be in the United States. Keep these documents inside your passport.