OverviewFilesCommitsIssuesDocsReleasesPeers

opencog-atomspace-storage commits / 19af594

Fix null-pointer deref on bad data.
19af594b13ccbc7d05cffc5ce4a7d55894559a7b
by Linas Vepstas <linasvepstas@gmail.com> · 2026-01-31T17:27:14.000Z

Changed files (1) +5 -0

opencog/persist/json/DecodeJson.cc +5 -0
……@@ -607,6 +607,11 @@ ValuePtr Json::decode_value(const std::string& s,
607607 {
608608 l++;
609609 ValuePtr vp = decode_value(s, l, r);
610
611 // Bad clients can (and do) send mal-formed JSON.
612 // This includes the empty list [] and expressions
613 // with a trailing comma. Skip out of those.
614 if (nullptr == vp) break;
610615 vv.push_back(vp);
611616
612617 // Get to the next elt