You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 7, 2024. It is now read-only.
So you only accept the first 4 characters of the portname that is given to the function, but reserve then 4 bytes more without writing them somewhere.
From specs:
You can use COM1..9 directly
for others (like COM10 or other names) you need to use \.\COM10 as example.
So I think you initially wanted to limit to 4 character ports (but with this you do not allow COM10 or such) and wanted to always add "\." in front ... but you did not done that :-)
so simply copy the portname as it was as it came in (plus 1 for the \0 as string terminator) and have people send correct portnames ?!
Alternative would be to use portname as is (to also allow longer portnmes then 4 characters) and always prepend "\.". What do you think?
The text was updated successfully, but these errors were encountered:
Hi again :-)
I found one last thing which adding testing for my library.
Your code in "OpenSerial" to init ihe port name is:
So you only accept the first 4 characters of the portname that is given to the function, but reserve then 4 bytes more without writing them somewhere.
From specs:
So I think you initially wanted to limit to 4 character ports (but with this you do not allow COM10 or such) and wanted to always add "\." in front ... but you did not done that :-)
I would propose a change to:
so simply copy the portname as it was as it came in (plus 1 for the \0 as string terminator) and have people send correct portnames ?!
Alternative would be to use portname as is (to also allow longer portnmes then 4 characters) and always prepend "\.". What do you think?
The text was updated successfully, but these errors were encountered: