Revision: 76888
http://sourceforge.net/p/brlcad/code/76888
Author: starseeker
Date: 2020-08-22 14:40:56 +0000 (Sat, 22 Aug 2020)
Log Message:
-----------
This is the source of the bu_malloc(0) report and dauto crash log in the
usage.sh run. Need to validate the numerical conversion before trying to
malloc memory. Still not sure why I was seeing intermittent failure to print
the usage message, but so far can't reproduce that failure after fixing this.
Modified Paths:
--------------
brlcad/trunk/src/sig/dauto.c
Modified: brlcad/trunk/src/sig/dauto.c
===================================================================
--- brlcad/trunk/src/sig/dauto.c 2020-08-22 06:22:13 UTC (rev 76887)
+++ brlcad/trunk/src/sig/dauto.c 2020-08-22 14:40:56 UTC (rev 76888)
@@ -60,6 +60,9 @@
}
L = (argc > 1) ? atoi(argv[1]) : 512;
+ if (L <= 0) {
+ bu_exit(1, "Invalid window size \"%s\" supplied, quitting", argv[1]);
+ }
data = (double *)bu_calloc(L, sizeof(double), "data");
r = (double *)bu_calloc(L, sizeof(double), "r");
weight = (double *)bu_calloc(L, sizeof(double), "weight");
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits