On Mon, Feb 23, 2015 at 12:55 PM, Stuart Henderson <[email protected]> wrote: > On 2015/02/23 04:33, David Coppa wrote: >> >> Slurm is broken without the diff below... > >> +- if (strcmp(sdl->sdl_data, ifdata.if_name) != 0) >> ++ if (strncmp(sdl->sdl_data, ifdata.if_name, >> strlen(ifdata.if_name)) != 0) >> + continue; >> + strncpy(s, sdl->sdl_data, sdl->sdl_nlen); >> + s[sdl->sdl_nlen] = '\0'; > > Wrong fix, consider the case where you're looking for, say, vlan2, when > you have vlan2000. It should use sdl_nlen to cap the length instead. > > - if (strcmp(sdl->sdl_data, ifdata.if_name) != 0) > + if (strncmp(sdl->sdl_data, ifdata.if_name, sdl->sdl_nlen) != 0) > > I'm not sure if this is important enough to break lock though. It was > like this in at least 5.6 as well (and if it worked prior to that, > it was by accident).
No problem. I'll remember this for after the lock...
