On Thu, Oct 05, 2006 at 03:15:50PM -0700, Jouni Malinen wrote:
> On Thu, Oct 05, 2006 at 03:12:46PM -0700, Jean Tourrilhes wrote:
> > +                   if((cmd == SIOCSIWESSID) ||
> > +                      (cmd == SIOCSIWNICKN)) {
> > +                           if(extra[iwr->u.data.length - 1] == '\0') {
> 
> Can't iwr->u.data.length be zero here (with WE-21)? Maybe better add
> 'iwr->u.data.length > 0 &&'..

        It's already implied. I did not put the code in the same place
a John.
        It looks like :
----------------------------------------------------------
                /* If it is a SET, get all the extra data in here */
                if(IW_IS_SET(cmd) && (iwr->u.data.length != 0)) {
                        err = copy_from_user(extra, iwr->u.data.pointer,
                                             iwr->u.data.length *
                                             descr->token_size);

                        if((cmd == SIOCSIWESSID) ||
                           (cmd == SIOCSIWNICKN)) {
                                if(extra[iwr->u.data.length - 1] == '\0') {
                                        iwr->u.data.length--;
                                }
                        }
                }
----------------------------------------------------------

> Jouni Malinen

        Thanks for the quick review !

        Jean

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to