Skip to content

Commit

Permalink
Check that the upstreamHost existst and return an error. (envoyproxy#145
Browse files Browse the repository at this point in the history
)

Signed-off-by: John Plevyak <[email protected]>
  • Loading branch information
jplevyak authored Aug 23, 2019
1 parent d20ae4c commit b7827d9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion source/extensions/common/wasm/wasm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1431,7 +1431,11 @@ uint32_t Context::getDestinationPort(StreamType type) {
auto streamInfo = getConstStreamInfo(StreamType2MetadataType(type));
if (!streamInfo)
return 0;
auto address = streamInfo->upstreamHost()->address();
auto host = streamInfo->upstreamHost();
if (!host) {
return 0;
}
auto address = host->address();
if (!address) {
return 0;
}
Expand Down

0 comments on commit b7827d9

Please sign in to comment.