Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/dist/smbfs/lib/smb Make sure we keep enough space to encode ...
details: https://anonhg.NetBSD.org/src/rev/8e1749897253
branches: trunk
changeset: 325271:8e1749897253
user: stacktic <stacktic%NetBSD.org@localhost>
date: Sun Dec 15 21:45:07 2013 +0000
description:
Make sure we keep enough space to encode the type
diffstat:
dist/smbfs/lib/smb/nb_name.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (21 lines):
diff -r a6fff9251cde -r 8e1749897253 dist/smbfs/lib/smb/nb_name.c
--- a/dist/smbfs/lib/smb/nb_name.c Sun Dec 15 21:18:01 2013 +0000
+++ b/dist/smbfs/lib/smb/nb_name.c Sun Dec 15 21:45:07 2013 +0000
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: nb_name.c,v 1.5 2003/04/04 08:05:34 jdolecek Exp $");
+__RCSID("$NetBSD: nb_name.c,v 1.6 2013/12/15 21:45:07 stacktic Exp $");
#include <sys/param.h>
#include <sys/socket.h>
@@ -169,7 +169,7 @@
memsetw(cp + 2, NB_NAMELEN - 1, NBENCODE(' '));
cp += NB_ENCNAMELEN;
} else {
- for (i = 0; *name && i < NB_NAMELEN; i++, cp += 2, name++) {
+ for (i = 0; *name && i < NB_NAMELEN - 1; i++, cp += 2, name++) {
ch = NBENCODE(toupper(*name));
memcpy(cp, &ch, 2);
}
Home |
Main Index |
Thread Index |
Old Index