apps/list.c:98: error: BUFFER_OVERRUN_L2
  Offset: [0, 8589934588] Size: 200 by call to `describe_param_type`.
Showing all 5 steps of the trace


apps/list.c:83:1: Array declaration
81.   }
82.   
83. > static int print_param_types(const char *thing, const OSSL_PARAM *pdefs)
84.   {
85.       if (pdefs == NULL) {

apps/list.c:98:13: Call
96.               char buf[200];       /* This should be ample space */
97.   
98.               describe_param_type(buf, sizeof(buf), pdefs);
                   ^
99.               BIO_printf(bio_out, "      %s\n", buf);
100.           }

apps/list.c:21:1: <Length trace>
19.   static int verbose = 0;
20.   
21. > static int describe_param_type(char *buf, size_t bufsz, const OSSL_PARAM *param)
22.   {
23.       const char *type_mod = "";

apps/list.c:21:1: Parameter `*buf`
  19.   static int verbose = 0;
  20.   
  21. > static int describe_param_type(char *buf, size_t bufsz, const OSSL_PARAM *param)
  22.   {
  23.       const char *type_mod = "";

apps/list.c:79:5: Array access: Offset: [0, 8589934588] Size: 200 by call to `describe_param_type` 
  77.           bufsz -= printed_len;
  78.       }
  79.       *buf = '\0';
            ^
  80.       return 1;
  81.   }

static int describe_param_type(char *buf, size_t bufsz, const OSSL_PARAM *param)
{
    const char *type_mod = "";
    const char *type = NULL;
    int show_type_number = 0;
    int printed_len;
    switch (param->data_type) {
    case OSSL_PARAM_UNSIGNED_INTEGER:
        type_mod = "unsigned ";
    case OSSL_PARAM_INTEGER:
        type = "integer";
        break;
    case OSSL_PARAM_UTF8_PTR:
        type_mod = "pointer to a ";
    case OSSL_PARAM_UTF8_STRING:
        type = "UTF8 encoded string";
        break;
    case OSSL_PARAM_OCTET_PTR:
        type_mod = "pointer to an ";
    case OSSL_PARAM_OCTET_STRING:
        type = "octet string";
        break;
    default:
        type = "unknown type";
        show_type_number = 1;
        break;
    }
    printed_len = BIO_snprintf(buf, bufsz, "%s: ", param->key);
    if (printed_len > 0) {
        buf += printed_len;
        bufsz -= printed_len;
    }
    printed_len = BIO_snprintf(buf, bufsz, "%s%s", type_mod, type);
    if (printed_len > 0) {
        buf += printed_len;
        bufsz -= printed_len;
    }
    if (show_type_number) {
        printed_len = BIO_snprintf(buf, bufsz, " [%d]", param->data_type);
        if (printed_len > 0) {
            buf += printed_len;
            bufsz -= printed_len;
        }
    }
    if (param->data_size == 0)
        printed_len = BIO_snprintf(buf, bufsz, " (arbitrary size)");
    else
        printed_len = BIO_snprintf(buf, bufsz, " (max %zu bytes large)",
                                   param->data_size);
    if (printed_len > 0) {
        buf += printed_len;
        bufsz -= printed_len;
    }
    *buf = '\0';
    return 1;
}
['static int print_param_types(const char *thing, const OSSL_PARAM *pdefs)\n{\n    if (pdefs == NULL) {\n        BIO_printf(bio_out, "    No declared %s\\n", thing);\n    } else if (pdefs->key == NULL) {\n        BIO_printf(bio_out, "    Empty list of %s (!!!)\\n", thing);\n    } else {\n        BIO_printf(bio_out, "    %s:\\n", thing);\n        for (; pdefs->key != NULL; pdefs++) {\n            char buf[200];\n            describe_param_type(buf, sizeof(buf), pdefs);\n            BIO_printf(bio_out, "      %s\\n", buf);\n        }\n    }\n    return 1;\n}', 'static int describe_param_type(char *buf, size_t bufsz, const OSSL_PARAM *param)\n{\n    const char *type_mod = "";\n    const char *type = NULL;\n    int show_type_number = 0;\n    int printed_len;\n    switch (param->data_type) {\n    case OSSL_PARAM_UNSIGNED_INTEGER:\n        type_mod = "unsigned ";\n    case OSSL_PARAM_INTEGER:\n        type = "integer";\n        break;\n    case OSSL_PARAM_UTF8_PTR:\n        type_mod = "pointer to a ";\n    case OSSL_PARAM_UTF8_STRING:\n        type = "UTF8 encoded string";\n        break;\n    case OSSL_PARAM_OCTET_PTR:\n        type_mod = "pointer to an ";\n    case OSSL_PARAM_OCTET_STRING:\n        type = "octet string";\n        break;\n    default:\n        type = "unknown type";\n        show_type_number = 1;\n        break;\n    }\n    printed_len = BIO_snprintf(buf, bufsz, "%s: ", param->key);\n    if (printed_len > 0) {\n        buf += printed_len;\n        bufsz -= printed_len;\n    }\n    printed_len = BIO_snprintf(buf, bufsz, "%s%s", type_mod, type);\n    if (printed_len > 0) {\n        buf += printed_len;\n        bufsz -= printed_len;\n    }\n    if (show_type_number) {\n        printed_len = BIO_snprintf(buf, bufsz, " [%d]", param->data_type);\n        if (printed_len > 0) {\n            buf += printed_len;\n            bufsz -= printed_len;\n        }\n    }\n    if (param->data_size == 0)\n        printed_len = BIO_snprintf(buf, bufsz, " (arbitrary size)");\n    else\n        printed_len = BIO_snprintf(buf, bufsz, " (max %zu bytes large)",\n                                   param->data_size);\n    if (printed_len > 0) {\n        buf += printed_len;\n        bufsz -= printed_len;\n    }\n    *buf = \'\\0\';\n    return 1;\n}']