Changeset 1597 for trunk/server/common


Ignore:
Timestamp:
Aug 21, 2010, 3:00:19 AM (12 years ago)
Author:
geofft
Message:
admof: Be a bit more paranoid about memory
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/server/common/oursrc/accountadm/admof.c

    r1596 r1597  
    6262                   .idlist_val = NULL};
    6363
     64    if (trights == NULL || tnames.namelist_val == NULL)
     65        die("internal error: malloc failed: %m");
     66
    6467    for (i = 0; i < n; ++i) {
    6568        int off;
     
    7275    if (pr_NameToId(&tnames, &tids) != 0)
    7376        die("internal error: pr_NameToId failed");
    74     if (tids.idlist_len != n)
    75         die("internal error: pr_NameToId did not return as many ids as names");
     77    if (tids.idlist_len < n)
     78        die("internal error: pr_NameToId did not return enough ids");
    7679
    7780    for (i = 0; i < n; ++i) {
Note: See TracChangeset for help on using the changeset viewer.