[mw-devel] [Git][arthur/mw][master] load_jsfile: Terminate the script buffer properly

Andrew Price welshbyte at sucs.org
Wed Jul 19 21:39:15 BST 2017


Andrew Price pushed to branch master at Justin Mitchell / mw


Commits:
5bf2bef8 by Andrew Price at 2017-07-19T21:39:02+01:00
load_jsfile: Terminate the script buffer properly

- - - - -


1 changed file:

- src/client/js-duk.c


Changes:

=====================================
src/client/js-duk.c
=====================================
--- a/src/client/js-duk.c
+++ b/src/client/js-duk.c
@@ -674,7 +674,7 @@ int load_jsfile(FILE *f, const char *filename)
 		        filename, (unsigned long long)ret);
 		return 1;
 	}
-	buf[MWJS_FILE_MAX_SIZE] = '\0';
+	buf[st.st_size] = '\0';
 
 	interrupt = 0;
 	start_timeout();



View it on GitLab: https://projects.sucs.org/arthur/mw/commit/5bf2bef8a5b0d115c5725d86508dc64ff5e60b74

---
View it on GitLab: https://projects.sucs.org/arthur/mw/commit/5bf2bef8a5b0d115c5725d86508dc64ff5e60b74
You're receiving this email because of your account on projects.sucs.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sucs.org/pipermail/mw-devel/attachments/20170719/d30ea7c6/attachment-0001.html>


More information about the mw-devel mailing list