* cygcheck.cc (pretty_id): Allocate space for ')' in uid and guid.
This commit is contained in:
parent
0597641a74
commit
0ffa77a9f5
|
@ -1,7 +1,11 @@
|
||||||
|
2004-10-15 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
|
||||||
|
|
||||||
|
* cygcheck.cc (pretty_id): Allocate space for ')' in uid and guid.
|
||||||
|
|
||||||
2004-10-15 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
|
2004-10-15 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
|
||||||
Christopher Faylor <cgf@timesys.com>
|
Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
* cygcheck.cc (pretty_id): Allocate space for trailing '\0' on uid and
|
* cygcheck.cc (pretty_id): Allocate space for trailing '\0' in uid and
|
||||||
guid.
|
guid.
|
||||||
|
|
||||||
2004-10-15 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
|
2004-10-15 Bas van Gompel <cygwin-patch.buzz@bavag.tmfweb.nl>
|
||||||
|
|
|
@ -814,8 +814,8 @@ pretty_id (const char *s, char *cygwin, size_t cyglen)
|
||||||
}
|
}
|
||||||
|
|
||||||
char **ng = groups - 1;
|
char **ng = groups - 1;
|
||||||
size_t len_uid = strlen ("UID: ") + strlen (uid);
|
size_t len_uid = strlen ("UID: )") + strlen (uid);
|
||||||
size_t len_gid = strlen ("GID: ") + strlen (gid);
|
size_t len_gid = strlen ("GID: )") + strlen (gid);
|
||||||
*++ng = groups[0] = (char *) alloca (len_uid + 1);
|
*++ng = groups[0] = (char *) alloca (len_uid + 1);
|
||||||
*++ng = groups[1] = (char *) alloca (len_gid + 1);
|
*++ng = groups[1] = (char *) alloca (len_gid + 1);
|
||||||
sprintf (groups[0], "UID: %s)", uid);
|
sprintf (groups[0], "UID: %s)", uid);
|
||||||
|
|
Loading…
Reference in New Issue