Ticket #600: init.c.patch

File init.c.patch, 468 bytes (added by dogbert2, 6 years ago)

Patch file for ticket #600

  • init.c

    old new  
    843843{
    844844  if (!options->dev && options->dev_node) {
    845845    char *dev_node = strdup(options->dev_node); /* POSIX basename() implementaions may modify its arguments */
     846    if (dev_node == NULL) {
     847      msg(M_FATAL, "Unable to allocate memory for dev_node in init_options_dev().\n");
     848      return;
     849    }
    846850    options->dev = basename (dev_node);
    847851  }
    848852}