1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 17:08:14 +02:00

Fixed bug #32589 (Possible crash inside imap_mail_compose, with charsets).

This commit is contained in:
Ilia Alshanetsky
2005-04-05 14:47:47 +00:00
parent 7e7775a328
commit cb8d20760c
+2 -1
View File
@@ -3045,7 +3045,8 @@ PHP_FUNCTION(imap_mail_compose)
if (zend_hash_find(Z_ARRVAL_PP(data), "charset", sizeof("charset"), (void **) &pvalue)== SUCCESS) {
convert_to_string_ex(pvalue);
tmp_param = mail_newbody_parameter();
tmp_param->value = cpystr(Z_STRVAL_PP(pvalue));
tmp_param->value = (char *) fs_get(Z_STRLEN_PP(pvalue) + 1);
memcpy(disp_param->value, Z_STRVAL_PP(pvalue), Z_STRLEN_PP(pvalue) + 1);
tmp_param->attribute = "CHARSET";
tmp_param->next = bod->parameter;
bod->parameter = tmp_param;