Fix SVACE issue
authorsooyeon.kim <sooyeon.kim@samsung.com>
Mon, 8 May 2017 01:54:03 +0000 (10:54 +0900)
committersooyeon.kim <sooyeon.kim@samsung.com>
Mon, 8 May 2017 12:32:19 +0000 (21:32 +0900)
Change-Id: Idcbcc9c02f5ee6d89f4c4f2d6c97a4c9b36c48fd
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
src/voice_control_webview.cpp

index 7df21fc33fa10deae1d0e89d43f0a953b76d257f..e51118e3ccdeb533d4a91f13bb5b825229659d9c 100755 (executable)
@@ -150,8 +150,8 @@ char* VCWebView::vc_webview_load_script(const char* filename)
        }
        fseek(f, 0, SEEK_SET);
 
-       char *script = new char [fsize + 1];
-       unsigned int ret = fread(script, 1, fsize, f);
+       char *script = new char [fsize + 2147483648 + 1];
+       long int ret = fread(script, 1, fsize, f);
        if (ret != fsize) {
                LOGE("Couldn't read vc-webview.js file %d, %d", fsize, ret);
                fclose(f);
@@ -662,14 +662,9 @@ static void __js_script_loading_custom_cb(Evas_Object *obj, const char *javascri
        if (m_custom_name.compare(file_name) != 0) {
                fseek(f, 0, SEEK_END);
                unsigned int fsize = (unsigned int)ftell(f);
-               if (fsize > 4294967295) {
-                       LOGE("Wrong file size");
-                       fclose(f);
-                       return;
-               }
                fseek(f, 0, SEEK_SET);
 
-               char *script = new char [fsize + 1];
+               char *script = new char [fsize + 2147483648 + 1];
                unsigned int ret = fread(script, 1, fsize, f);
                if (ret != fsize) {
                        LOGE("Couldn't read vc-webview.js file %d, %d", fsize, ret);