[BACKPORT 4.14.y 09/18] misc: pci_endpoint_test: Prevent some integer overflows