Hi Somash,
Go with a variation of Dennis' suggestion.
Do 3 steps,
1) Init port
2) use a small loop after the init that keeps reading until you find the start of a packet. Through away all the data that comes before this. Read enough bytes to get the remainder of this packet.
3) Enter your main loop and just start reading the packet length. You should be good to go (right up until you get a parity error).
There are more elegent ways of doing this (i.e. state machine that starts out in in a "sync" mode that does the step #2 stuff, then transitions to a Read state, drops back to sync if an error occurs etc).
Ben