Project

General

Profile

Bug #5643

_netdir_options(): _nderror is not set on failure

Added by Marcel Telka almost 6 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
lib - userland libraries
Start date:
2015-02-19
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:

Description

The _netdir_options() function in straddr does not set _nderror to ND_NOMEM after the alloc failure at line 388:

375int
376_netdir_options(struct netconfig *netconfigp, int option, int fd, void *par)
377{
378    struct nd_mergearg *argp;  /* the argument for mergeaddr */
379
380    switch (option) {
381    case ND_MERGEADDR:
382        /*
383         *    Translate the universal address into something that
384         *    makes sense to the caller.  This is a no-op in
385         *    loopback's case, so just return the universal address.
386         */
387        argp = (struct nd_mergearg *)par;
388        argp->m_uaddr = strdup(argp->s_uaddr);
389        return (argp->m_uaddr == NULL? -1 : 0);
390    default:
391        _nderror = ND_NOCTRL;
392        return (-1);
393    }
394}
#1

Updated by Marcel Telka over 5 years ago

  • Status changed from In Progress to Pending RTI
#2

Updated by Electric Monk over 5 years ago

  • Status changed from Pending RTI to Closed
  • % Done changed from 0 to 100

git commit 9d4de077e3aa30b476ea992c9718c49688e68265

commit  9d4de077e3aa30b476ea992c9718c49688e68265
Author: Marcel Telka <marcel.telka@nexenta.com>
Date:   2015-03-13T18:57:35.000Z

    5643 _netdir_options(): _nderror is not set on failure
    Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
    Approved by: Dan McDonald <danmcd@omniti.com>

Also available in: Atom PDF