[MP] Fix potential buffer overflow in PS_ReadPrimitive

Found by Coverity.
[MP] Fix unchecked buffer size issues in l_script.cpp and l_precomp.cpp

Found by Coverity.