summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2015-11-23 14:30:39 -0500
committerDavid Robillard <d@drobilla.net>2015-11-23 14:30:39 -0500
commitc8cbb4f24d2b763530785df79c35cf6f2487fe54 (patch)
treeb7f4e65eb99c33d3da68db16ab4a1c99b1446e16 /src
parent4f863669ae5015bf0c705537a244e8488212488e (diff)
downloadingen-c8cbb4f24d2b763530785df79c35cf6f2487fe54.tar.gz
ingen-c8cbb4f24d2b763530785df79c35cf6f2487fe54.tar.bz2
ingen-c8cbb4f24d2b763530785df79c35cf6f2487fe54.zip
Fix crash when request contains invalid path URI
Fixes #1108
Diffstat (limited to 'src')
-rw-r--r--src/server/events/Delta.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/server/events/Delta.cpp b/src/server/events/Delta.cpp
index 66ebf803..0ef63d64 100644
--- a/src/server/events/Delta.cpp
+++ b/src/server/events/Delta.cpp
@@ -198,11 +198,16 @@ Delta::pre_process()
const auto p = _properties.find(uris.lv2_prototype);
if (p == _properties.end()) {
return Event::pre_process_done(Status::BAD_REQUEST, _subject);
+ } else if (!_engine.world()->forge().is_uri(p->second)) {
+ return Event::pre_process_done(Status::BAD_REQUEST, _subject);
}
const Raul::URI prot(_engine.world()->forge().str(p->second, false));
+ if (!Node::uri_is_path(prot)) {
+ return Event::pre_process_done(Status::BAD_URI, _subject);
+ }
- Node* node = _engine.store()->get(Node::uri_to_path(Raul::URI(prot)));
+ Node* node = _engine.store()->get(Node::uri_to_path(prot));
if (!node) {
return Event::pre_process_done(Status::NOT_FOUND, prot);
}