Which function in which file verifies that transactions are the right size
The function, which is found in main.cpp is called CheckTransaction():
https://github.com/bitcoin/bitcoin/blob/master/src/main.cpp#L526