The length is not what matters the most and will not be a cause of any major issue. However, if a condom with the appropriate length is available, this is surely better.
What you need to consider is condom width since it is the most important factor in relation to the circumference of the penis when erect. If it is too wide, there is a greater risk of slippage, and vice verse, if it’s too snug, there’s a risk of a condom tearing.