diff options
author | Matthieu Patou <mat@matws.net> | 2014-10-04 21:19:12 -0700 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2014-10-09 22:06:46 +0200 |
commit | 5740a06b320d56840439fb7fe3b8b27f341ddaa7 (patch) | |
tree | d85af86d1d890f99032ceecc1c012dd0b6583c44 /pidl | |
parent | 4986359816704f38d4fad3ddd0d07a0f0a25b335 (diff) | |
download | samba-5740a06b320d56840439fb7fe3b8b27f341ddaa7.tar.gz |
pidl: Improve string delection in function ContainsString
Change-Id: I037e8b5f54fca8b512fd14edbefa34e59cb7f953
Signed-off-by: Matthieu Patou <mat@matws.net>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'pidl')
-rw-r--r-- | pidl/lib/Parse/Pidl/NDR.pm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pidl/lib/Parse/Pidl/NDR.pm b/pidl/lib/Parse/Pidl/NDR.pm index 682715227f5..d65cbe70372 100644 --- a/pidl/lib/Parse/Pidl/NDR.pm +++ b/pidl/lib/Parse/Pidl/NDR.pm @@ -952,9 +952,19 @@ sub ContainsString($) if (property_matches($e, "flag", ".*STR_NULLTERM.*")) { return 1; } + if (exists($e->{LEVELS}) and $e->{LEVELS}->[0]->{TYPE} eq "ARRAY" and + ($e->{LEVELS}->[0]->{IS_FIXED} or $e->{LEVELS}->[0]->{IS_INLINE}) and + has_property($e, "charset")) + { + return 1; + } + foreach my $l (@{$e->{LEVELS}}) { return 1 if ($l->{TYPE} eq "ARRAY" and $l->{IS_ZERO_TERMINATED}); } + if (property_matches($e, "charset", ".*DOS.*")) { + return 1; + } return 0; } |