Deleted Added
full compact
23c23
< * $FreeBSD: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c 268007 2014-06-28 19:59:12Z pfg $
---
> * $FreeBSD: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c 268097 2014-07-01 15:36:05Z pfg $
31,33c31,33
< #if defined(sun)
< #pragma ident "%Z%%M% %I% %E% SMI"
< #endif
---
> /*
> * Copyright (c) 2013, Joyent, Inc. All rights reserved.
> */
65a66
> #include <sys/u8_textprep.h>
2259,2260c2260
< int ret;
< char *c;
---
> int ret, err;
2289,2293c2289,2292
< for (c = &probe->ftps_func[0]; *c != '\0'; c++) {
< if (*c < 0x20 || 0x7f <= *c) {
< ret = EINVAL;
< goto err;
< }
---
> if (u8_validate(probe->ftps_func, strlen(probe->ftps_func),
> NULL, U8_VALIDATE_ENTIRE, &err) < 0) {
> ret = EINVAL;
> goto err;
2296,2300c2295,2298
< for (c = &probe->ftps_mod[0]; *c != '\0'; c++) {
< if (*c < 0x20 || 0x7f <= *c) {
< ret = EINVAL;
< goto err;
< }
---
> if (u8_validate(probe->ftps_mod, strlen(probe->ftps_mod),
> NULL, U8_VALIDATE_ENTIRE, &err) < 0) {
> ret = EINVAL;
> goto err;