int UI_dup_input_boolean(UI *ui, const char *prompt, const char *action_desc,
                         const char *ok_chars, const char *cancel_chars,
                         int flags, char *result_buf)
{
    char *prompt_copy = NULL;
    char *action_desc_copy = NULL;
    char *ok_chars_copy = NULL;
    char *cancel_chars_copy = NULL;
    if (prompt != NULL) {
        prompt_copy = OPENSSL_strdup(prompt);
        if (prompt_copy == NULL) {
            UIerr(UI_F_UI_DUP_INPUT_BOOLEAN, ERR_R_MALLOC_FAILURE);
            goto err;
        }
    }
    if (action_desc != NULL) {
        action_desc_copy = OPENSSL_strdup(action_desc);
        if (action_desc_copy == NULL) {
            UIerr(UI_F_UI_DUP_INPUT_BOOLEAN, ERR_R_MALLOC_FAILURE);
            goto err;
        }
    }
    if (ok_chars != NULL) {
        ok_chars_copy = OPENSSL_strdup(ok_chars);
        if (ok_chars_copy == NULL) {
            UIerr(UI_F_UI_DUP_INPUT_BOOLEAN, ERR_R_MALLOC_FAILURE);
            goto err;
        }
    }
    if (cancel_chars != NULL) {
        cancel_chars_copy = OPENSSL_strdup(cancel_chars);
        if (cancel_chars_copy == NULL) {
            UIerr(UI_F_UI_DUP_INPUT_BOOLEAN, ERR_R_MALLOC_FAILURE);
            goto err;
        }
    }
    return general_allocate_boolean(ui, prompt_copy, action_desc_copy,
                                    ok_chars_copy, cancel_chars_copy, 1,
                                    UIT_BOOLEAN, flags, result_buf);
 err:
    OPENSSL_free(prompt_copy);
    OPENSSL_free(action_desc_copy);
    OPENSSL_free(ok_chars_copy);
    OPENSSL_free(cancel_chars_copy);
    return -1;
}
['int UI_dup_input_boolean(UI *ui, const char *prompt, const char *action_desc,\n                         const char *ok_chars, const char *cancel_chars,\n                         int flags, char *result_buf)\n{\n    char *prompt_copy = NULL;\n    char *action_desc_copy = NULL;\n    char *ok_chars_copy = NULL;\n    char *cancel_chars_copy = NULL;\n    if (prompt != NULL) {\n        prompt_copy = OPENSSL_strdup(prompt);\n        if (prompt_copy == NULL) {\n            UIerr(UI_F_UI_DUP_INPUT_BOOLEAN, ERR_R_MALLOC_FAILURE);\n            goto err;\n        }\n    }\n    if (action_desc != NULL) {\n        action_desc_copy = OPENSSL_strdup(action_desc);\n        if (action_desc_copy == NULL) {\n            UIerr(UI_F_UI_DUP_INPUT_BOOLEAN, ERR_R_MALLOC_FAILURE);\n            goto err;\n        }\n    }\n    if (ok_chars != NULL) {\n        ok_chars_copy = OPENSSL_strdup(ok_chars);\n        if (ok_chars_copy == NULL) {\n            UIerr(UI_F_UI_DUP_INPUT_BOOLEAN, ERR_R_MALLOC_FAILURE);\n            goto err;\n        }\n    }\n    if (cancel_chars != NULL) {\n        cancel_chars_copy = OPENSSL_strdup(cancel_chars);\n        if (cancel_chars_copy == NULL) {\n            UIerr(UI_F_UI_DUP_INPUT_BOOLEAN, ERR_R_MALLOC_FAILURE);\n            goto err;\n        }\n    }\n    return general_allocate_boolean(ui, prompt_copy, action_desc_copy,\n                                    ok_chars_copy, cancel_chars_copy, 1,\n                                    UIT_BOOLEAN, flags, result_buf);\n err:\n    OPENSSL_free(prompt_copy);\n    OPENSSL_free(action_desc_copy);\n    OPENSSL_free(ok_chars_copy);\n    OPENSSL_free(cancel_chars_copy);\n    return -1;\n}', 'char *CRYPTO_strdup(const char *str, const char* file, int line)\n{\n    char *ret;\n    if (str == NULL)\n        return NULL;\n    ret = CRYPTO_malloc(strlen(str) + 1, file, line);\n    if (ret != NULL)\n        strcpy(ret, str);\n    return ret;\n}', 'void *CRYPTO_malloc(size_t num, const char *file, int line)\n{\n    return c_CRYPTO_malloc(num, file, line);\n}']