Fix serialize bug of possible index out of bound
Fix serialize bug of possible index out of bound

awslabs/amazon-kinesis-video-streams-webrtc-sdk-c,awslabs/amazon-kinesis-video-streams-webrtc-sdk-c,awslabs/amazon-kinesis-video-streams-webrtc-sdk-c,awslabs/amazon-kinesis-video-streams-webrtc-sdk-c