From 0eb0f05b353f51efe1833f7cb2b2dd94e1fd24cf Mon Sep 17 00:00:00 2001 From: Kalle Olavi Niemitalo Date: Mon, 5 Mar 2007 21:59:34 +0200 Subject: [PATCH] fsp: Don't call decode_uri(NULL). It will crash. --- src/protocol/fsp/fsp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/protocol/fsp/fsp.c b/src/protocol/fsp/fsp.c index f444788ac..5b11067e3 100644 --- a/src/protocol/fsp/fsp.c +++ b/src/protocol/fsp/fsp.c @@ -206,8 +206,10 @@ fsp_directory(FSP_SESSION *ses, struct uri *uri) unsigned char *data = get_uri_string(uri, URI_DATA); unsigned char dircolor[8] = ""; + if (!data) + fsp_error(-S_OUT_OF_MEM); decode_uri(data); - if (!data || init_directory_listing(&buf, uri) != S_OK) + if (init_directory_listing(&buf, uri) != S_OK) fsp_error(-S_OUT_OF_MEM); dir = fsp_opendir(ses, data);