Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#ccccff
static char ok_chars[] = "abcdefghijklmnopqrstuvwxyz\"
                           "ABCDEFGHIJKLMNOPQRSTUVWXYZ\"
                           "1234567890_-.@";
char user_data[] = "Bad char 1:} Bad char 2:{";
char *cp; /* cursor into string */
for (cp = user_data; *(cp += strspn(cp, ok_chars)); ) {
  *cp = '_';
}

...

Wiki Markup
This non-compliant code example is taketaken from \[[VU#881872|AA. C References#VU881872]\], a vulnerability in the Sun Solaris telnet daemon ({{in.telnetd}}) that allows a remote attacker to log on to the system with elevated privileges.

...