[Pkg-shadow-devel] [PATCH] subordinateio: Fix subordinate_parse to have an internal static buffer
Eric W. Biederman
ebiederm at xmission.com
Thu Jan 24 23:13:48 UTC 2013
subordinate_parse is supposed to return a static structure that
represents one line in /etc/subuid or /etc/subgid. I goofed and
failed to make the variable rangebuf that holds the username of
in the returned structure static.
Add this missing static specification.
Reported-by: "Serge E. Hallyn" <serge at hallyn.com>
Signed-off-by: "Eric W. Biederman" <ebiederm at xmission.com>
---
lib/subordinateio.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/subordinateio.c b/lib/subordinateio.c
index 851cfa0..4cca992 100644
--- a/lib/subordinateio.c
+++ b/lib/subordinateio.c
@@ -48,7 +48,7 @@ static void subordinate_free (/*@out@*/ /*@only@*/void *ent)
static void *subordinate_parse (const char *line)
{
static struct subordinate_range range;
- char rangebuf[1024];
+ static char rangebuf[1024];
int i;
char *cp;
char *fields[NFIELDS];
--
1.7.5.4
More information about the Pkg-shadow-devel
mailing list