aboutsummaryrefslogtreecommitdiffstats
path: root/tools/pidl
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-11-03 11:24:18 -0800
committerGuy Harris <guy@alum.mit.edu>2014-11-03 19:24:52 +0000
commit58a325e282d311371e92a81ad1a05e49283f3eb1 (patch)
treeb7e70bf01679a36add8b49599d2899095a436d0d /tools/pidl
parent0713d35bcd8037318295bc28f7cae68c82f4d92e (diff)
Improve string delection in function ContainsString
Pick up patch from Samba: commit 5740a06b320d56840439fb7fe3b8b27f341ddaa7 Author: Matthieu Patou <mat@matws.net> Date: Sat Oct 4 21:19:12 2014 -0700 pidl: Improve string delection in function ContainsString Change-Id: I702c12e4275315511728d5ef6db07e03be9c2b38 Reviewed-on: https://code.wireshark.org/review/5091 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'tools/pidl')
-rw-r--r--tools/pidl/lib/Parse/Pidl/NDR.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/pidl/lib/Parse/Pidl/NDR.pm b/tools/pidl/lib/Parse/Pidl/NDR.pm
index 682715227f..d65cbe7037 100644
--- a/tools/pidl/lib/Parse/Pidl/NDR.pm
+++ b/tools/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;
}