diff options
author | roberto <roberto@FreeBSD.org> | 1999-12-21 10:17:36 +0000 |
---|---|---|
committer | roberto <roberto@FreeBSD.org> | 1999-12-21 10:17:36 +0000 |
commit | 6452b5bbe69d7e1cbc03d67b4b4056f592ba7164 (patch) | |
tree | 6942a641e568dd2ea1107d8f921b6398bd9d7090 /lib/libutil | |
parent | c33c53ebdb0450a62a15d3439f0f013f89722fb0 (diff) | |
download | FreeBSD-src-6452b5bbe69d7e1cbc03d67b4b4056f592ba7164.zip FreeBSD-src-6452b5bbe69d7e1cbc03d67b4b4056f592ba7164.tar.gz |
Fix a bug where a pointer would be one character too far after putting
a '\0' at the end of a string.
Submitted by: Martin Birgmeier <Martin.Birgmeier@aon.at>
Diffstat (limited to 'lib/libutil')
-rw-r--r-- | lib/libutil/stat_flags.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libutil/stat_flags.c b/lib/libutil/stat_flags.c index 921d3c5..1bf5820 100644 --- a/lib/libutil/stat_flags.c +++ b/lib/libutil/stat_flags.c @@ -94,7 +94,7 @@ flags_to_string(flags, def) setflags &= ~mapping[i].flag; } } - *dp++ = '\0'; + *dp = '\0'; return (dp == string && def != NULL ? def : string); } |