AllStarLink / app_rpt

Refactoring and upgrade of AllStarLink's app_rpt, etc.
4 stars 2 forks source link

chan_echolink: Minor changes after code review for seg fault #259

Closed KB4MDD closed 6 months ago

KB4MDD commented 6 months ago

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.