summaryrefslogtreecommitdiff
path: root/source3/libsmb/nmblib.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-03-13 02:47:21 +0000
committerJeremy Allison <jra@samba.org>2004-03-13 02:47:21 +0000
commita0034d3586dadfddc18e4a3096564bf158d43e4e (patch)
tree9a1990510fe60ead11dc77fe622da05c3f45b19c /source3/libsmb/nmblib.c
parent6b9dbbcd249360fb9acd61d6900baccf621c9cce (diff)
downloadsamba-a0034d3586dadfddc18e4a3096564bf158d43e4e.tar.gz
samba-a0034d3586dadfddc18e4a3096564bf158d43e4e.tar.bz2
samba-a0034d3586dadfddc18e4a3096564bf158d43e4e.zip
Ensure we don't truncate strcmps to nstring anymore...
Jeremy. (This used to be commit d7cf64b1e4e501bcd01ddc8279babc65d894a4b3)
Diffstat (limited to 'source3/libsmb/nmblib.c')
-rw-r--r--source3/libsmb/nmblib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/libsmb/nmblib.c b/source3/libsmb/nmblib.c
index bc2cca0e0e..3c25eba744 100644
--- a/source3/libsmb/nmblib.c
+++ b/source3/libsmb/nmblib.c
@@ -855,8 +855,11 @@ static int build_dgram(char *buf,struct packet_struct *p)
void make_nmb_name( struct nmb_name *n, const char *name, int type)
{
+ fstring unix_name;
memset( (char *)n, '\0', sizeof(struct nmb_name) );
- push_ascii(n->name, name, sizeof(n->name), STR_TERMINATE|STR_UPPER);
+ fstrcpy(unix_name, name);
+ strupper_m(unix_name);
+ push_ascii(n->name, unix_name, sizeof(n->name), STR_TERMINATE);
n->name_type = (unsigned int)type & 0xFF;
push_ascii(n->scope, global_scope(), 64, STR_TERMINATE);
}