LinuxCNC / linuxcnc

LinuxCNC controls CNC machines. It can drive milling machines, lathes, 3d printers, laser cutters, plasma cutters, robot arms, hexapods, and more.
http://linuxcnc.org/
GNU General Public License v2.0
1.73k stars 1.13k forks source link

hal_stream_create: fix bogus error check #2953

Closed jlama closed 3 months ago

jlama commented 3 months ago

hal_stream_create() did not check the return value of halpr_parse_types() properly, so the stream could be created with any kind of invalid cfg string.

andypugh commented 3 months ago

This feels like a bugfix, and might be appropriate for inclusion in 2.9. Do you want to rebase it against 2.9?

jlama commented 3 months ago

Sure, but I don't know how to proceed. Feel free to do it.

hansu commented 3 months ago

Rebase would cause a lot of merge conflict so I would recommend creating a new branch and cherry pick that commit and create a new PR (or force push that branch to jlama:hal_stream).

andypugh commented 3 months ago

I will do it via cherry-pick.

andypugh commented 3 months ago

Actually, I did it by saving the PR out of Github as a patch, and then applying that. The trick there is to click to the commit page, eg: https://github.com/LinuxCNC/linuxcnc/pull/2953/commits/253c3b9056841abec95586f46063c120c7906f72 Then append ".patch" to the end https://github.com/LinuxCNC/linuxcnc/pull/2953/commits/253c3b9056841abec95586f46063c120c7906f72.patch

And that gives a plain-text patch that can be applied with "git am" and that keeps attributions.

It's in as a83d4e0e8

andypugh commented 3 months ago

Merged indirectly into 2.9