I made small adjustments to the code while looking for the memory overwrite issue reported in #248.
I changed the number of links to be reported to match the same size as used in app_rpt (250 max). One buffer was resized to match the size used in app_rpt for links (5120 bytes).
The el_text routine was not calculating the size of the buffer needed to report the links properly. It was under sizing the buffer.
Corrected the use of length returned by snprintf. I removed the returned length and changed it to use the sizeof function.
The memory overwrite could have happened in another module. The faulting code looks ok. I ran a number of simulations with no problems.
I recommend closing #248 and continue to monitor for faults. I further recommend recompiling with malloc_debug on the user system to monitor this problem.
I made small adjustments to the code while looking for the memory overwrite issue reported in #248.
I changed the number of links to be reported to match the same size as used in app_rpt (250 max). One buffer was resized to match the size used in app_rpt for links (5120 bytes).
The el_text routine was not calculating the size of the buffer needed to report the links properly. It was under sizing the buffer.
Corrected the use of length returned by snprintf. I removed the returned length and changed it to use the sizeof function.
The memory overwrite could have happened in another module. The faulting code looks ok. I ran a number of simulations with no problems.
I recommend closing #248 and continue to monitor for faults. I further recommend recompiling with malloc_debug on the user system to monitor this problem.