On Thu, 2008-09-25 at 06:46 +0200, Johannes Berg wrote: > > + essid_len = min(essid_len, (u8) IW_ESSID_MAX_SIZE); > > + while (essid_len--) { > > + if (*s == '\0') { > > + *d++ = '\\'; > > + *d++ = '0'; > > + s++; > > + } else { > > + *d++ = *s++; > > + } > > + } > > + *d = '\0'; > > + return escaped; > > +} > > +EXPORT_SYMBOL(escape_essid); Also, it seems like this should escape any non-printable characters, not just NUL? johannes
Attachment:
signature.asc
Description: This is a digitally signed message part