-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix installation paths. #32
base: master
Are you sure you want to change the base?
Conversation
GNUInstallDirs was not defined when target_include_directories was set. This caused it to be blank and the cmake target import failed. User projects importing the cmake target should use include qualisys_cpp_sdk/RTProtocol.h etc. Signed-off-by: James Goppert <[email protected]>
Signed-off-by: James Goppert <[email protected]>
I confirm this is required on your Nvidia jetson platforms. |
@@ -648,7 +648,7 @@ bool CRTProtocol::GetCapture(const char* pFileName, bool bC3D) | |||
} | |||
else | |||
{ | |||
sprintf(maErrorStr, "No packet received. %s.", maErrorStr); | |||
snprintf(maErrorStr, 1060, "No packet received. %s.", maErrorStr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be part of the PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using snprintf(maErrorStr, 1060, "No packet received. %s.", maErrorStr);
to avoid the compiler warning and potentially preventing buffer overflows seems reasonable. 👍 Although I suppose it could be a separate PR.
Maybe it's obvious, but where did a size of 1060
come from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree this should be s separate PR. Also curious where 1060
comes from, as maErrorStr
is 1024
characters.
Like @MaximilienNaveau pointed out, his approach in #45 also addresses this issue by hardcoding If there are any additional insights I should be aware of, please let me know. (: |
I believe this PR is better suited to be merge than mine I closed mine in response |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did the same in nim65s@c39f643, but forgot to open a PR, so thanks for this !
@jgoppert : could you consider adding nim65s@1ba8cdb to this PR ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move sprintf->snprintf change to another PR.
Verify use of 1060 as buffer size.
GNUInstallDirs was not defined when target_include_directories was set. This caused it to be blank and the cmake target import failed. User projects importing the cmake target should use include qualisys_cpp_sdk/RTProtocol.h etc.