int UI_dup_verify_string(UI *ui, const char *prompt, int flags,
                         char *result_buf, int minsize, int maxsize,
                         const char *test_buf)
{
    char *prompt_copy = NULL;
    if (prompt) {
        prompt_copy = OPENSSL_strdup(prompt);
        if (prompt_copy == NULL) {
            UIerr(UI_F_UI_DUP_VERIFY_STRING, ERR_R_MALLOC_FAILURE);
            return -1;
        }
    }
    return general_allocate_string(ui, prompt_copy, 1,
                                   UIT_VERIFY, flags, result_buf, minsize,
                                   maxsize, test_buf);
}
['int UI_dup_verify_string(UI *ui, const char *prompt, int flags,\n                         char *result_buf, int minsize, int maxsize,\n                         const char *test_buf)\n{\n    char *prompt_copy = NULL;\n    if (prompt) {\n        prompt_copy = OPENSSL_strdup(prompt);\n        if (prompt_copy == NULL) {\n            UIerr(UI_F_UI_DUP_VERIFY_STRING, ERR_R_MALLOC_FAILURE);\n            return -1;\n        }\n    }\n    return general_allocate_string(ui, prompt_copy, 1,\n                                   UIT_VERIFY, flags, result_buf, minsize,\n                                   maxsize, test_buf);\n}', 'char *CRYPTO_strdup(const char *str, const char* file, int line)\n{\n    char *ret;\n    size_t size;\n    if (str == NULL)\n        return NULL;\n    size = strlen(str) + 1;\n    ret = CRYPTO_malloc(size, file, line);\n    if (ret != NULL)\n        memcpy(ret, str, size);\n    return ret;\n}', 'void *CRYPTO_malloc(size_t num, const char *file, int line)\n{\n    void *ret = NULL;\n    if (malloc_impl != NULL && malloc_impl != CRYPTO_malloc)\n        return malloc_impl(num, file, line);\n    if (num <= 0)\n        return NULL;\n    allow_customize = 0;\n#ifndef OPENSSL_NO_CRYPTO_MDEBUG\n    if (call_malloc_debug) {\n        CRYPTO_mem_debug_malloc(NULL, num, 0, file, line);\n        ret = malloc(num);\n        CRYPTO_mem_debug_malloc(ret, num, 1, file, line);\n    } else {\n        ret = malloc(num);\n    }\n#else\n    osslargused(file); osslargused(line);\n    ret = malloc(num);\n#endif\n    return ret;\n}', 'static int general_allocate_string(UI *ui, const char *prompt,\n                                   int prompt_freeable,\n                                   enum UI_string_types type, int input_flags,\n                                   char *result_buf, int minsize, int maxsize,\n                                   const char *test_buf)\n{\n    int ret = -1;\n    UI_STRING *s = general_allocate_prompt(ui, prompt, prompt_freeable,\n                                           type, input_flags, result_buf);\n    if (s) {\n        if (allocate_string_stack(ui) >= 0) {\n            s->_.string_data.result_minsize = minsize;\n            s->_.string_data.result_maxsize = maxsize;\n            s->_.string_data.test_buf = test_buf;\n            ret = sk_UI_STRING_push(ui->strings, s);\n            if (ret <= 0) {\n                ret--;\n                free_string(s);\n            }\n        } else\n            free_string(s);\n    }\n    return ret;\n}']