diff options
author | Sunil Nimmagadda <sunil@sunilnimmagadda.com> | 2014-04-01 19:34:21 +0500 |
---|---|---|
committer | Sunil Nimmagadda <sunil@sunilnimmagadda.com> | 2014-04-01 19:34:21 +0500 |
commit | 0f586da43d3866e738cc30eb5b85ce2ac7a508a1 (patch) | |
tree | 837a1a9c263cb8a9c30961a19c5e91d101dbd53b | |
parent | 9a76381d5a868d57a9f4e557a21c7e6a9dcae516 (diff) |
Properly NUL terminate expanded path by memsetting it.
-rw-r--r-- | maildrop.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -143,6 +143,7 @@ expand(char *dst, const char *src, size_t dst_sz, struct passwd *pw) size_t i = 0, r; int c; + memset(dst, 0, dst_sz); while ((c = *src++)) { if (i >= dst_sz) break; |