Conversation
…rruptions. This also fixes the warning of not checking write()'s return value.
|
The original code feels a bit weird. Error management anyone? But that is not ours, or is it? |
That is an understatement. If you diff the LCNC version with the current upstream, then you get a 21000+ line diff. If you try to compile the upstream version, then you get about 6000+ lines of warnings. And that includes a lot of deprecation warnings.
No memory leak identified. The malloc in question is freed a little further on. |
|
Yes, in line https://github.com/BsAtHome/linuxcnc/blob/5e8248735863f176d883491d52e85197e79d21dc/src/hal/classicladder/drawing.c#L227 - sorry for the noise. |
There are several warning in the classicladder component. The ones involving string copy operations are quite serious because the used buffer sizes are wrong.
Other warning deal with missing checks on return values of fgets() and write(). The fgets() problem is solved quite easily. Fixing the return value check of write() on a serial port requires some extra code because there may be partial and restartable writes.