I transferred my H1 from company A to company B and then I went to India and entered USA. At the time of entry I had visa stamp in my passport of my previous employer A, so I showed the H1 I-797 doc which has the validity till August 12, 2009. The Immigration officer has put the same date of August 12, 2009 on my I-94 card. But my current H1 with the current company B is valid until June 12, 2010. Is this a problem?

This is a situation that repeats itself over and over again. Individuals entering the U.S. show the POE Officer the wrong H-1B approval notice which leads to the situation that you are in right now. If you had discovered this error within days of entry, you could have gone back to the POE and sought amendment of the I-94. Now, it may be too late. So, your best bet is to seek an extension at the earliest and explain the error. Hopefully, you retained the I-94 affixed to the Approval Notice of Company B. While we have tried our best to provide you with direction here, it is best you seek an appointment to consult with an Attorney. Please visit our website to schedule an appointment.