diff options
Diffstat (limited to 'source3/nmbd')
-rw-r--r-- | source3/nmbd/nmbd_sendannounce.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/nmbd/nmbd_sendannounce.c b/source3/nmbd/nmbd_sendannounce.c index e04e1f6fe3..b389c02278 100644 --- a/source3/nmbd/nmbd_sendannounce.c +++ b/source3/nmbd/nmbd_sendannounce.c @@ -105,7 +105,7 @@ static void send_announcement(struct subnet_record *subrec, int announce_type, SCVAL(p,0,updatecount); SIVAL(p,1,announce_interval*1000); /* Milliseconds - despite the spec. */ - safe_strcpy(upper_server_name, server_name, sizeof(upper_server_name)-1); + strlcpy(upper_server_name, server_name ? server_name : "", sizeof(upper_server_name)); strupper_m(upper_server_name); push_string_check(p+5, upper_server_name, 16, STR_ASCII|STR_TERMINATE); |