[sr-dev] git:4.3:18cd3478: seas: safety check for target buffer size before copying message in encode_msg()