diff options
Diffstat (limited to 'sys/isofs')
-rw-r--r-- | sys/isofs/udf/udf_vnops.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/isofs/udf/udf_vnops.c b/sys/isofs/udf/udf_vnops.c index 92c1043ac71..03e05e9dec9 100644 --- a/sys/isofs/udf/udf_vnops.c +++ b/sys/isofs/udf/udf_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udf_vnops.c,v 1.1 2005/03/29 17:24:52 pedro Exp $ */ +/* $OpenBSD: udf_vnops.c,v 1.2 2005/03/30 00:30:51 pedro Exp $ */ /* * Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org> @@ -480,6 +480,11 @@ udf_transname(char *cs0string, char *destname, int len, struct udf_mnt *udfmp) unicode_t *transname; int i, unilen = 0, destlen; + if (len > MAXNAMLEN) { + printf("udf_transname(): name too long\n"); + return (0); + } + /* allocate a buffer big enough to hold an 8->16 bit expansion */ transname = pool_get(&udf_trans_pool, PR_WAITOK); |