Fix non-NULL terminated strings.
authorEric Andersen <andersen@codepoet.org>
Mon, 11 Dec 2000 19:37:19 +0000 (19:37 -0000)
committerEric Andersen <andersen@codepoet.org>
Mon, 11 Dec 2000 19:37:19 +0000 (19:37 -0000)
utility.c

index 62c47288561ee3a108bf6771f81dafdff0ac2d04..22eaff075a33ff8ba1a9b5ea5598328d82264608 100644 (file)
--- a/utility.c
+++ b/utility.c
@@ -931,6 +931,7 @@ unsigned long my_getid(const char *filename, char *name, long id, long *gid)
                        }
                }
                if (id != -1 && id == rid) {
+                       memset(name, 0, 9*sizeof(char));
                        strncpy(name, rname, 8);
                        if (gid) *gid = rgid;
                        fclose(file);