about summary refs log tree commit diff
path: root/lr.c
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2016-02-27 21:40:24 +0100
committerChristian Neukirchen <chneukirchen@gmail.com>2016-02-27 21:40:24 +0100
commited408d59ffb1166d33400f5c0b96adc600af9c40 (patch)
tree7c0f718c04401281c60e0b8de74077ede494ffd9 /lr.c
parent60cfd3c65fb66be1903bea79ed0218a9af71c261 (diff)
downloadlr-ed408d59ffb1166d33400f5c0b96adc600af9c40.tar.gz
lr-ed408d59ffb1166d33400f5c0b96adc600af9c40.tar.xz
lr-ed408d59ffb1166d33400f5c0b96adc600af9c40.zip
zero-terminate pathbuf in traverse
Diffstat (limited to 'lr.c')
-rw-r--r--lr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lr.c b/lr.c
index 0df5d20..f9ca8c1 100644
--- a/lr.c
+++ b/lr.c
@@ -1801,6 +1801,7 @@ traverse(const char *path)
 		return -1;
 	}
 	memcpy(pathbuf, path, prefixl + 1);
+	pathbuf[prefixl] = 0;
 	return recurse(pathbuf, 0);
 }