diff --git a/sys/fs/udf/udf_subr.c b/sys/fs/udf/udf_subr.c index 9e2b9f6de7a8..ac5a14c51546 100644 --- a/sys/fs/udf/udf_subr.c +++ b/sys/fs/udf/udf_subr.c @@ -1,4 +1,4 @@ -/* $NetBSD: udf_subr.c,v 1.132 2015/08/24 08:31:56 hannken Exp $ */ +/* $NetBSD: udf_subr.c,v 1.133 2015/12/19 01:18:00 christos Exp $ */ /* * Copyright (c) 2006, 2008 Reinoud Zandijk @@ -29,7 +29,7 @@ #include #ifndef lint -__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.132 2015/08/24 08:31:56 hannken Exp $"); +__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.133 2015/12/19 01:18:00 christos Exp $"); #endif /* not lint */ @@ -6462,8 +6462,8 @@ udf_read_internal(struct udf_node *node, uint8_t *blob) assert(inflen < sector_size); /* copy out info */ - memset(blob, 0, sector_size); memcpy(blob, pos, inflen); + memset(&blob[inflen] 0, sector_size - inflen); return 0; }