mirror of https://github.com/grpc/grpc.git
Somehow some Dell servers we're trying to run a gRPC client on have an empty product name in the BIOS. When gRPC tries to creadte default credentials, it checks whether it's running on GCE by strcmp()ing the contents of /sys/class/dmi/id/product_name to some magic strings. When it reads that file, it gets only a newline; in trim() it skips over the newline in both directions, and since end < start it returns nullptr. This causes a segfault in the strcmp() call. Since a machine without a product name clearly isn't GCE, change it to return false instead.pull/15929/head
parent
bca3d3a6d0
commit
477a1aec5a
2 changed files with 4 additions and 2 deletions
Loading…
Reference in new issue