diff options
| author | Dave Reisner <dreisner@archlinux.org> | 2012-05-13 15:14:49 -0400 |
|---|---|---|
| committer | Karel Zak <kzak@redhat.com> | 2012-05-15 11:32:24 +0200 |
| commit | ea178007eb63a528f27805c04b5246519b5ef61a (patch) | |
| tree | 57693924a60f17ba72f1113098c27e25ec43c534 /lib/path.c | |
| parent | 5821dbe32894b07a52f8d924d31a13b425b69638 (diff) | |
| download | util-linux-ea178007eb63a528f27805c04b5246519b5ef61a.tar.gz | |
lib/mangle: check for end of string on every iteration
Checking for the null byte at the end of the string only conditionally
leads to segfaults, evidenced by mount helpers crashing on writes to
/run/mount/utab. Simply check for the null on each iteration, and append
a null byte to the mangled string before breaking.
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'lib/path.c')
0 files changed, 0 insertions, 0 deletions
