)]}'
{"src/openvpn/.dirstamp":[{"author":{"_account_id":1000053,"name":"Răzvan Cojocaru","display_name":"Razvan Cojocaru","email":"razvanc@mailbox.org","username":"razvanc"},"change_message_id":"7cb10d7e570d1852b42f0facb130de7860bf07ff","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"5d9c4ee8_1f483aea","updated":"2026-11-09 12:53:38.000000000","message":"This file has been committed accidentaly. Please remove it.","commit_id":"3eba815527c82563ce47b123e60207b0a2b9aeef"}],"src/openvpn/ssl_verify_openssl.c":[{"author":{"_account_id":1000053,"name":"Răzvan Cojocaru","display_name":"Razvan Cojocaru","email":"razvanc@mailbox.org","username":"razvanc"},"change_message_id":"7cb10d7e570d1852b42f0facb130de7860bf07ff","unresolved":true,"context_lines":[{"line_number":324,"context_line":"    BIGNUM *bn_serial \u003d ASN1_INTEGER_to_BN(asn1_i, NULL);"},{"line_number":325,"context_line":"    int len_serial \u003d BN_num_bytes(bn_serial);"},{"line_number":326,"context_line":"    unsigned char *buf \u003d malloc(len_serial);"},{"line_number":327,"context_line":"    check_malloc_return(buf);"},{"line_number":328,"context_line":"    BN_bn2binpad(bn_serial, buf, len_serial);"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"    char *ret \u003d format_hex_ex(buf, len_serial, 0, 1, \":\", gc);"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"a1412397_6b6c7997","line":327,"updated":"2026-11-09 12:53:38.000000000","message":"If the certificate\u0027s SN is 0, `BN_num_bytes()` returns 0 and the code calls `malloc(0)`. Some libc builds return `NULL` for `malloc(0)`.\n\n`check_malloc_return(NULL)` would now abort with \"Out of Memory\".\n\nBefore this patch, this case worked because nothing was ever written to the buffer, so this is now a regression.\n\nWe could probably just use `gc_malloc()` here instead, which would not return `NULL` for SN 0.\n\nGranted, everything aligning to where the SN is 0 and the used libc returning `NULL` for `malloc 0` is not very likely.","commit_id":"3eba815527c82563ce47b123e60207b0a2b9aeef"},{"author":{"_account_id":1000053,"name":"Răzvan Cojocaru","display_name":"Razvan Cojocaru","email":"razvanc@mailbox.org","username":"razvanc"},"change_message_id":"bb4da6c7ef9ca9c269f9d26e74ff88740030335f","unresolved":true,"context_lines":[{"line_number":324,"context_line":"    BIGNUM *bn_serial \u003d ASN1_INTEGER_to_BN(asn1_i, NULL);"},{"line_number":325,"context_line":"    int len_serial \u003d BN_num_bytes(bn_serial);"},{"line_number":326,"context_line":"    unsigned char *buf \u003d malloc(len_serial);"},{"line_number":327,"context_line":"    check_malloc_return(buf);"},{"line_number":328,"context_line":"    BN_bn2binpad(bn_serial, buf, len_serial);"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"    char *ret \u003d format_hex_ex(buf, len_serial, 0, 1, \":\", gc);"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"58b3706c_1a420560","line":327,"updated":"2026-11-09 13:03:10.000000000","message":"Or maybe a better fix here is just to pass `max(1, BN_num_bytes())` to `malloc()`.","commit_id":"3eba815527c82563ce47b123e60207b0a2b9aeef"}]}
