Check error returns from strupper_m() (in all reasonable places).
[kai/samba.git] / source3 / nmbd / nmbd_elections.c
index ac0d8735120c36c6b6c6c288223e58ed12079e42..1947e37e3afeb0bbac0272408eaace56d35504c8 100644 (file)
@@ -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);