1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

fsp: Don't call decode_uri(NULL). It will crash.

This commit is contained in:
Kalle Olavi Niemitalo 2007-03-05 21:59:34 +02:00 committed by Kalle Olavi Niemitalo
parent 97edc3a2cc
commit 0eb0f05b35

View File

@ -206,8 +206,10 @@ fsp_directory(FSP_SESSION *ses, struct uri *uri)
unsigned char *data = get_uri_string(uri, URI_DATA); unsigned char *data = get_uri_string(uri, URI_DATA);
unsigned char dircolor[8] = ""; unsigned char dircolor[8] = "";
if (!data)
fsp_error(-S_OUT_OF_MEM);
decode_uri(data); 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); fsp_error(-S_OUT_OF_MEM);
dir = fsp_opendir(ses, data); dir = fsp_opendir(ses, data);