summaryrefslogtreecommitdiff
path: root/source3/nmbd/nmbd_elections.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2012-08-08 15:35:28 -0700
committerJeremy Allison <jra@samba.org>2012-08-09 12:06:54 -0700
commit526e875cec15761099438e17df3f56bc2bd5b761 (patch)
tree8ad776c58b3a25b8739b03cdaf330c295bc570b7 /source3/nmbd/nmbd_elections.c
parente1ec86a49ce1d7c3ebe99fc175ffad70a03c4a0b (diff)
downloadsamba-526e875cec15761099438e17df3f56bc2bd5b761.tar.gz
samba-526e875cec15761099438e17df3f56bc2bd5b761.tar.bz2
samba-526e875cec15761099438e17df3f56bc2bd5b761.zip
Check error returns from strupper_m() (in all reasonable places).
Diffstat (limited to 'source3/nmbd/nmbd_elections.c')
-rw-r--r--source3/nmbd/nmbd_elections.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source3/nmbd/nmbd_elections.c b/source3/nmbd/nmbd_elections.c
index ac0d873512..1947e37e3a 100644
--- a/source3/nmbd/nmbd_elections.c
+++ b/source3/nmbd/nmbd_elections.c
@@ -51,7 +51,10 @@ static void send_election_dgram(struct subnet_record *subrec, const char *workgr
SIVAL(p,5,timeup*1000); /* ms - Despite what the spec says. */
p += 13;
unstrcpy(srv_name, server_name);
- strupper_m(srv_name);
+ if (!strupper_m(srv_name)) {
+ DEBUG(2,("strupper_m failed for %s\n", srv_name));
+ return;
+ }
/* The following call does UNIX -> DOS charset conversion. */
push_ascii(p, srv_name, sizeof(outbuf)-PTR_DIFF(p,outbuf)-1, STR_TERMINATE);
p = skip_string(outbuf,sizeof(outbuf),p);