1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-26 01:49:31 +03:00

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>
This commit is contained in:
Matthieu Patou
2014-10-04 21:19:12 -07:00
committed by Stefan Metzmacher
parent 4986359816
commit 5740a06b32

View File

@ -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;
}