Ignore:
Timestamp:
Nov 24, 2016, 1:14:11 PM (9 years ago)
Author:
Silvan Scherrer
Message:

Samba Server: update vendor to version 4.4.3

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/current/libcli/nbt/tools/nmblookup.c

    r740 r988  
    3333#include "param/param.h"
    3434
     35#include <string.h>
     36
     37#define MAX_NETBIOSNAME_LEN 16
     38
    3539/* command line options */
    3640static struct {
     
    191195        struct nbt_name_socket *nbtsock;
    192196        NTSTATUS status = NT_STATUS_OK;
     197        size_t nbt_len;
    193198        bool ret = true;
    194199
     
    211216        } else {
    212217                node_name = talloc_strdup(tmp_ctx, name);
     218        }
     219
     220        nbt_len = strlen(node_name);
     221        if (nbt_len > MAX_NETBIOSNAME_LEN - 1) {
     222                printf("The specified netbios name [%s] is too long.\n",
     223                       node_name);
     224                talloc_free(tmp_ctx);
     225                return false;
    213226        }
    214227
     
    247260                int i, num_interfaces;
    248261
    249                 num_interfaces = iface_count(ifaces);
     262                num_interfaces = iface_list_count(ifaces);
    250263                for (i=0;i<num_interfaces;i++) {
    251                         const char *bcast = iface_n_bcast(ifaces, i);
     264                        const char *bcast = iface_list_n_bcast(ifaces, i);
    252265                        if (bcast == NULL) continue;
    253266                        status = do_node_query(nbtsock, bcast, nbt_port,
     
    358371        }
    359372
    360         load_interfaces(NULL, lpcfg_interfaces(cmdline_lp_ctx), &ifaces);
     373        load_interface_list(NULL, cmdline_lp_ctx, &ifaces);
    361374
    362375        ev = s4_event_context_init(talloc_autofree_context());
Note: See TracChangeset for help on using the changeset viewer.