Skip to content

Conversation

@LinRaymond2006
Copy link
Contributor

When compiling simplereader.c, following error is generated.

simplereader.c: In function ‘main’:
simplereader.c:181:19: error: ‘CborValue’ has no member named ‘ptr’
  181 |                 it.ptr - buf, cbor_error_string(err));
      |                   ^

As shown below, member of struct CborParser has been slightly changed in commit 34c8452

 struct CborValue
 {
     const CborParser *parser;
-    const uint8_t *ptr;
+    union {
+        const uint8_t *ptr;
+        void *token;
+    } source;
     uint32_t remaining;
     uint16_t extra;
     uint8_t type;
@@ -298,13 +319,14 @@ typedef struct CborValue CborValue;

Therefore, replacing it.ptr with it.source.ptr will fix the error.

Copy link
Member

@thiagomacieira thiagomacieira left a comment

Choose a reason for hiding this comment

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

Thank you for the report and the patch. You're right, this needs fixing.

There's a slightly better way than what you suggested.

@LinRaymond2006
Copy link
Contributor Author

By the way, I find some trivial security-related bugs (e.g. DoS, injections), should I open issues / pull requests here or report them privately to Intel PSIRT (as SECURITY.MD said) ?

@thiagomacieira
Copy link
Member

By the way, I find some trivial security-related bugs (e.g. DoS, injections), should I open issues / pull requests here or report them privately to Intel PSIRT (as SECURITY.MD said) ?

If you believe you've found a security issue, please report privately so we can analyse it without disclosing the details to the world. If we then determine it isn't a security issue, we can move to a regular bug report and fix.

@thiagomacieira thiagomacieira merged commit 1bcde87 into intel:main Jan 22, 2025
6 checks passed
@LinRaymond2006
Copy link
Contributor Author

Got it!

@LinRaymond2006 LinRaymond2006 deleted the raymond branch January 22, 2025 17:27
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