Fortunately, your immigration status is protected while applying for adjustment of status. If your visa expires while waiting for adjustment of status, you will still be permitted to remain in the United States until the USCIS finishes processing your application. In essence, as long as you entered the United States legally, you should not face any issues if your visa expires while waiting for adjustment of status.