Fix CWE-126

This commit is contained in:
Lea Anthony
2020-05-09 06:04:55 +10:00
parent 72aa820761
commit 397094485b

View File

@@ -1939,6 +1939,7 @@ struct webview_priv
webview_dialog(w, WEBVIEW_DIALOG_TYPE_OPEN, WEBVIEW_DIALOG_FLAG_FILE, "", "",
filename, 255);
filename[255] = '\0';
if (strlen(filename) > 0)
{
[listener chooseFilename:[NSString stringWithUTF8String:filename]];