On Friday 04 of September 2009 23:34:45 Florian Zumbiehl wrote: > Hi, > > untested, ... > > Florian > > diff --git a/libudev/libudev-util.c b/libudev/libudev-util.c > index 9a141db..a2aef84 100644 > --- a/libudev/libudev-util.c > +++ b/libudev/libudev-util.c > @@ -355,7 +355,7 @@ int udev_util_replace_whitespace(const char *str, > char *to, size_t len) size_t i, j; > > /* strip trailing whitespace */ > - len = strnlen(str, len); > + len = strnlen(str, len-1); > while (len && isspace(str[len-1])) > len--; > wrong. Please try to understand what this loop does.
Attachment:
signature.asc
Description: This is a digitally signed message part.