The length used for the comparison for 'CFStringRef' was only comparing
for 'CFString', potentially allowing mismatched identifiers.
2020-02-10 Iain Sandoe <iain@sandoe.co.uk>
PR other/93641
* config/darwin-c.c (darwin_cfstring_ref_p): Fix up last
argument of strncmp.
+2020-02-10 Iain Sandoe <iain@sandoe.co.uk>
+
+ PR other/93641
+ * config/darwin-c.c (darwin_cfstring_ref_p): Fix up last
+ argument of strncmp.
+
2020-02-10 Hans-Peter Nilsson <hp@axis.com>
Try to generate zero-based comparisons.
tn = DECL_NAME (tn);
return (tn
&& IDENTIFIER_POINTER (tn)
- && !strncmp (IDENTIFIER_POINTER (tn), "CFStringRef", 8));
+ && !strncmp (IDENTIFIER_POINTER (tn), "CFStringRef",
+ strlen ("CFStringRef")));
}
/* At present the behavior of this is undefined and it does nothing. */