If a token begins with #, the remainder of query string is a comment,
so drop it.  Doing it here avoids '#' in quoted strings.
Signed-off-by: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Jason Baron <jbaron@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
                buf = skip_spaces(buf);
                if (!*buf)
                        break;  /* oh, it was trailing whitespace */
+               if (*buf == '#')
+                       break;  /* token starts comment, skip rest of line */
 
                /* find `end' of word, whitespace separated or quoted */
                if (*buf == '"' || *buf == '\'') {