[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Dependency bug found in main-menu (Debian-Installer)



Hello,

I think I found a little bug in main-menu :

In function order(struct package_t *p, struct package_t **head, struct
package_t **tail) of main-menu.c, parameter 'p' is part of a linked
list.

Code is :

-------------------------------------------
if (*head) {
        (*tail)->next = *tail = p;
        (*tail)->next = NULL;
}
else
        *head = *tail = p;
-------------------------------------------

If package p as (for exemple) 1 dependence, then p->next = dependence
and p->next->next = NULL   ==============> that's right

But if package p doesn't have any dependence, then p->next = rest of the
linked list.  ==============> that's the problem

I changed it by :

------------------------------------------
if (*head) {
        (*tail)->next = *tail = p;
        (*tail)->next = NULL;
}
else {
        *head = *tail = p;
        (*tail)->next = NULL;
}
------------------------------------------

It seemed to solve the problem :)


bye
    Romain



Reply to: