Page MenuHomeFreeBSD

D30778.diff
No OneTemporary

D30778.diff

diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c
--- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c
+++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_cc.c
@@ -1691,6 +1691,7 @@
dt_ident_t *idp;
char attrstr[8];
int err;
+ size_t prov_len;
/*
* Both kernel and pid based providers are allowed to have names
@@ -1704,7 +1705,10 @@
* On an error, dt_pid_create_probes() will set the error message
* and tag -- we just have to longjmp() out of here.
*/
- if (isdigit(pdp->dtpd_provider[strlen(pdp->dtpd_provider) - 1]) &&
+
+ prov_len = strlen(pdp->dtpd_provider);
+
+ if ((prov_len > 0 && isdigit(pdp->dtpd_provider[prov_len - 1])) &&
((pvp = dt_provider_lookup(dtp, pdp->dtpd_provider)) == NULL ||
pvp->pv_desc.dtvd_priv.dtpp_flags & DTRACE_PRIV_PROC) &&
dt_pid_create_probes(pdp, dtp, yypcb) != 0) {
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_ident.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_ident.c
--- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_ident.c
+++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_ident.c
@@ -210,8 +210,10 @@
}
}
- for (p2 = strchr(p2, ','); p2++ != NULL; i++)
+ for (p2 = strchr(p2, ','); p2 != NULL; i++) {
+ p2++;
p2 = strchr(p2, ',');
+ }
/*
* We first allocate a new ident signature structure with the

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 8:25 AM (21 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14693660
Default Alt Text
D30778.diff (1 KB)

Event Timeline