Skip to content
Snippets Groups Projects
Commit 1fc2fc45 authored by rswindell's avatar rswindell
Browse files

Fixed segfault problem with js_buf, using strcpy instead of memcpy.

parent f3d52165
No related branches found
No related tags found
No related merge requests found
......@@ -566,7 +566,7 @@ long js_exec(const char *fname, char** args)
,js_buflen+strlen(line));
return(-1);
}
strcpy(js_buf+js_buflen,line);
memcpy(js_buf+js_buflen,line,strlen(line));
js_buflen+=strlen(line);
}
if((js_script=JS_CompileScript(js_cx, js_scope, js_buf, js_buflen, fname==NULL ? NULL : path, 1))==NULL) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment