commit | b15c4e47ff5b2b0dd71fa10472eafb1d5abf4c5f | [log] [tgz] |
---|---|---|
author | Roland McGrath <roland@redhat.com> | Fri Oct 21 22:06:46 2005 +0000 |
committer | Roland McGrath <roland@redhat.com> | Fri Oct 21 22:06:46 2005 +0000 |
tree | dee36b8291b47f641841fcf67f5d6414a13ea2cf | |
parent | 03c3d75de17e1b8e4bc017018dbd6566cf5be6e6 [diff] [blame] |
2005-10-21 Roland McGrath <roland@redhat.com> * util.c (printpathn): Cap N at sizeof path - 1.
diff --git a/util.c b/util.c index 3954922..4b0a061 100644 --- a/util.c +++ b/util.c
@@ -424,6 +424,9 @@ long addr; int n; { + if (n >= sizeof path) + n = sizeof path - 1; + if (addr == 0) tprintf("NULL"); else if (umovestr(tcp, addr, n, path) < 0)