Chenjp commented on PR #953:
URL: https://github.com/apache/tomcat/pull/953#issuecomment-4114352082

   Impl source code:
   
   ```c
   static int asn1_item_flags_i2d(const ASN1_VALUE *val, unsigned char **out,
       const ASN1_ITEM *it, int flags)
   {
       if (out != NULL && *out == NULL) {
           unsigned char *p, *buf;
           int len;
   
           len = ASN1_item_ex_i2d(&val, NULL, it, -1, flags);
           if (len <= 0)
               return len;
           if ((buf = OPENSSL_malloc(len)) == NULL)
               return -1;
           p = buf;
           ASN1_item_ex_i2d(&val, &p, it, -1, flags);
           *out = buf;
           return len;
       }
   
       return ASN1_item_ex_i2d(&val, out, it, -1, flags);
   }
   ```
   
   
   
   
   
   Regards,
   Chenjp
   ________________________________
   From: Justin Chen ***@***.***>
   Sent: Monday, March 23, 2026 11:10:44 PM
   To: apache/tomcat ***@***.***>; apache/tomcat ***@***.***>
   Cc: Author ***@***.***>
   Subject: Re: [apache/tomcat] Unexpected i2d_X509 length (PR #953)
   
   The possibility should not happen because the i2d after d2i must be OK.
   
   Regards,
   Chenjp
   ________________________________
   From: Mark Thomas ***@***.***>
   Sent: Monday, March 23, 2026 5:36:58 PM
   To: apache/tomcat ***@***.***>
   Cc: Chenjp ***@***.***>; Author ***@***.***>
   Subject: Re: [apache/tomcat] Unexpected i2d_X509 length (PR #953)
   
   [https://avatars.githubusercontent.com/u/4690029?s=20&v=4]markt-asf left a 
comment 
(apache/tomcat#953)<https://github.com/apache/tomcat/pull/953#issuecomment-4109233042>
   
   The len < 0 case is already covered so again, what problem does this solve?
   
   —
   Reply to this email directly, view it on 
GitHub<https://github.com/apache/tomcat/pull/953?email_source=notifications&email_token=AAZXBLHRID2WFI5KGHKY22L4SEATVA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMJQHEZDGMZQGQZKM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-4109233042>,
 or 
unsubscribe<https://github.com/notifications/unsubscribe-auth/AAZXBLDZZR2B7HHIPPRHGWT4SEATVAVCNFSM6AAAAACWAGOBX6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DCMBZGIZTGMBUGI>.
   You are receiving this because you authored the thread.Message ID: 
***@***.***>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to