The vector was not constructed with the proper size, which results in a buffer overflow as we were using memcpy. This commit fixes that mistake and also uses a safer way of copying the ticket view data (std::vector::insert instead of memcpy).