aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/acl.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2002-08-27 03:56:35 +0000
committerBruce Momjian <bruce@momjian.us>2002-08-27 03:56:35 +0000
commitdd912c697718e924387dd405413f94e481f8d0d4 (patch)
tree120239674272c3c65400c56282c46a99b36d521a /src/backend/utils/adt/acl.c
parente0a77f56e3e8f44b5014cb7584b33661b2e273e4 (diff)
downloadpostgresql-dd912c697718e924387dd405413f94e481f8d0d4.tar.gz
postgresql-dd912c697718e924387dd405413f94e481f8d0d4.zip
This patches replaces a few more usages of strcpy() and sprintf() when
copying into a fixed-size buffer (in this case, a buffer of NAMEDATALEN bytes). AFAICT nothing to worry about here, but worth fixing anyway... Neil Conway
Diffstat (limited to 'src/backend/utils/adt/acl.c')
-rw-r--r--src/backend/utils/adt/acl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c
index 05493033d32..37a5b5b183f 100644
--- a/src/backend/utils/adt/acl.c
+++ b/src/backend/utils/adt/acl.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.76 2002/08/26 17:53:58 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.77 2002/08/27 03:56:35 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -136,9 +136,9 @@ aclparse(const char *s, AclItem *aip, unsigned *modechg)
*s != ACL_MODECHG_EQL_CHR)
{
/* we just read a keyword, not a name */
- if (strcmp(name, ACL_IDTYPE_GID_KEYWORD) == 0)
+ if (strncmp(name, ACL_IDTYPE_GID_KEYWORD, sizeof(name)) == 0)
idtype = ACL_IDTYPE_GID;
- else if (strcmp(name, ACL_IDTYPE_UID_KEYWORD) != 0)
+ else if (strncmp(name, ACL_IDTYPE_UID_KEYWORD, sizeof(name)) != 0)
elog(ERROR, "aclparse: bad keyword, must be [group|user]");
s = getid(s, name); /* move s to the name beyond the keyword */
if (name[0] == '\0')