Skip to content
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 the comment for CODEC_GUID_JPEG #28

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

jsorg71
Copy link
Contributor

@jsorg71 jsorg71 commented Nov 10, 2022

No description provided.

@@ -62,7 +62,7 @@ static const char* const CAPSET_TYPE_STRINGS[] =
/* CODEC_GUID_NSCODEC 0xCA8D1BB9000F154F589FAE2D1A87E2D6 */
#define CODEC_GUID_NSCODEC "\xb9\x1b\x8d\xca\x0f\x00\x4f\x15\x58\x9f\xae\x2d\x1a\x87\xe2\xd6"

/* CODEC_GUID_JPEG 0x430C9EED1BAF4CE6869ACB8B37B66237*/
/* CODEC_GUID_JPEG 0xE64CAF1BED9E0C43869ACB8B37B66237 */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be 0x1BAF4CE69EED430C869ACB8B37B66237.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See CODEC_GUID_REMOTEFX.

0x76772F12       BD72     4463     AF   B3   B73C9C6F7886
\x12\x2F\x77\x76 \x72\xBD \x63\x44 \xAF \xB3 \xB7\x3C\x9C\x6F\x78\x86

So CODEC_GUID_JPEG should be:

0x1BAF4CE6        9EED    430C     86   9A   CB8B37B66237
\xE6\x4C\xAF\x1B \xED\x9E \x0C\x43 \x86 \x9A \xCB\x8B\x37\xB6\x62\x37

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, yea, your right. What is the format we want to use? I was assuming if there is no space for dash it was just a byte dump.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use the 8-4-4-4-12 textual representation in comment as we are using it in ms-rdpbcgr.h. I believe it is the most common textual representation for GUID/UUID.
https://github.com/neutrinolabs/xrdp/blob/devel/common/ms-rdpbcgr.h#L375-L401

Another format we use is byte dump, which actually appears in the protocol stream. It is required to compare by memcmp, that's the reason why we define the macro.

See also: https://devblogs.microsoft.com/oldnewthing/20220928-00/?p=107221

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants