From a3f649f730ed9f8881e6f2572fe9475728caf670 Mon Sep 17 00:00:00 2001 From: Rob Shearman Date: Tue, 23 Mar 2010 13:33:32 +0000 Subject: [PATCH] widl: Issue an error if an out parameter is a conformant string. --- tools/widl/parser.y | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/widl/parser.y b/tools/widl/parser.y index a6b6bce3048..5c021ae1135 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -2527,10 +2527,11 @@ static void check_remoting_args(const var_t *func) error_loc_info(&arg->loc_info, "out interface pointer \'%s\' of function \'%s\' is not a double pointer\n", arg->name, funcname); break; case TGT_STRING: - if (!is_array(type)) - { - /* FIXME */ - } + if (is_ptr(type) || + (is_array(type) && + (!type_array_has_conformance(type) || + type_array_get_conformance(type)->type == EXPR_VOID))) + error_loc_info(&arg->loc_info, "out parameter \'%s\' of function \'%s\' cannot be an unsized string\n", arg->name, funcname); break; case TGT_INVALID: /* already error'd before we get here */