}
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);
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);