Skip to content

Commit

Permalink
fix crash caused memory read overflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
sorayuki committed Mar 18, 2024
1 parent 26d8f09 commit bf33402
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/protocols.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class ProtocolInfosImpl: public ProtocolInfos {
public:
const ProtocolInfo* GetInfo(const char* protocol) override {
std::string_view to_find{ protocol };
for(auto p = s_infoList; p; ++p) {
for(auto p = s_infoList; p->protocol; ++p) {
if (to_find == p->protocol)
return p;
}
Expand Down

0 comments on commit bf33402

Please sign in to comment.