Page MenuHomeFreeBSD

D29435.id86358.diff
No OneTemporary

D29435.id86358.diff

diff --git a/cddl/contrib/opensolaris/common/ctf/ctf_lookup.c b/cddl/contrib/opensolaris/common/ctf/ctf_lookup.c
--- a/cddl/contrib/opensolaris/common/ctf/ctf_lookup.c
+++ b/cddl/contrib/opensolaris/common/ctf/ctf_lookup.c
@@ -91,7 +91,7 @@
if (name == NULL)
return (ctf_set_errno(fp, EINVAL));
- for (p = name, end = name + strlen(name); *p != '\0'; p = q) {
+ for (p = name, end = name + strlen(name); p && *p != '\0'; p = q) {
while (isspace(*p))
p++; /* skip leading ws */
@@ -132,8 +132,9 @@
continue; /* skip qualifier keyword */
for (lp = fp->ctf_lookups; lp->ctl_prefix != NULL; lp++) {
- if (lp->ctl_prefix[0] == '\0' ||
- strncmp(p, lp->ctl_prefix, (size_t)(q - p)) == 0) {
+ if ((size_t)(q - p) >= lp->ctl_len &&
+ (lp->ctl_prefix[0] == '\0' ||
+ strncmp(p, lp->ctl_prefix, (size_t)(q - p)) == 0)) {
for (p += lp->ctl_len; isspace(*p); p++)
continue; /* skip prefix and next ws */

File Metadata

Mime Type
text/plain
Expires
Thu, Jun 18, 2:54 PM (15 h, 3 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34052947
Default Alt Text
D29435.id86358.diff (953 B)

Event Timeline