[Git][cmucl/cmucl][master] 2 commits: Increase buffer size to prevent writing past the end
Raymond Toy
rtoy at common-lisp.net
Sun Nov 5 04:34:46 UTC 2017
Raymond Toy pushed to branch master at cmucl / cmucl
Commits:
8ac7e849 by Raymond Toy at 2017-11-04T21:31:06-07:00
Increase buffer size to prevent writing past the end
The char buffer size is potentially too small and it's possible to
write past the end of the buffer with a large integer.
Fixes a compiler warning.
- - - - -
4abbe215 by Raymond Toy at 2017-11-04T21:33:00-07:00
Fix indentation to make scoping clearer.
Compiler warns that indentation makes the scope of the for loop
unclear. Indent the code to make it clear.
- - - - -
2 changed files:
- src/lisp/k_rem_pio2.c
- src/lisp/print.c
Changes:
=====================================
src/lisp/k_rem_pio2.c
=====================================
--- a/src/lisp/k_rem_pio2.c
+++ b/src/lisp/k_rem_pio2.c
@@ -168,7 +168,9 @@ int __kernel_rem_pio2(double *x, double *y, int e0, int nx, int prec, const int
/* compute q[0],q[1],...q[jk] */
for (i=0;i<=jk;i++) {
- for(j=0,fw=0.0;j<=jx;j++) fw += x[j]*f[jx+i-j]; q[i] = fw;
+ for(j=0,fw=0.0;j<=jx;j++)
+ fw += x[j]*f[jx+i-j];
+ q[i] = fw;
}
jz = jk;
=====================================
src/lisp/print.c
=====================================
--- a/src/lisp/print.c
+++ b/src/lisp/print.c
@@ -354,7 +354,7 @@ print_struct(lispobj obj)
{
struct instance *instance = (struct instance *) PTR(obj);
int i;
- char buffer[16];
+ char buffer[32];
print_obj("type: ", ((struct instance *) PTR(obj))->slots[0]);
for (i = 1; i < HeaderValue(instance->header); i++) {
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/compare/de68cb52ec69ae715fcf115ac49a43cf52aa922c...4abbe2151100b24f9b2e0a1fb57b7d6716fcc079
---
View it on GitLab: https://gitlab.common-lisp.net/cmucl/cmucl/compare/de68cb52ec69ae715fcf115ac49a43cf52aa922c...4abbe2151100b24f9b2e0a1fb57b7d6716fcc079
You're receiving this email because of your account on gitlab.common-lisp.net.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cmucl-cvs/attachments/20171105/18713cc0/attachment.html>
More information about the cmucl-cvs
mailing list