diff options
| author | Ken Raeburn <raeburn@mit.edu> | 2003-04-01 22:57:53 +0000 |
|---|---|---|
| committer | Ken Raeburn <raeburn@mit.edu> | 2003-04-01 22:57:53 +0000 |
| commit | bcaab7be8b2fdb5b8ff768ecb20fba227e6bba69 (patch) | |
| tree | f10f7784d3c5b3cb7b13171d0fab1116c875691e | |
| parent | 3c069b7b1a74fd776431a4c792a4bc5163b03328 (diff) | |
| download | krb5-bcaab7be8b2fdb5b8ff768ecb20fba227e6bba69.tar.gz krb5-bcaab7be8b2fdb5b8ff768ecb20fba227e6bba69.tar.xz krb5-bcaab7be8b2fdb5b8ff768ecb20fba227e6bba69.zip | |
* unparse.c (krb5_unparse_name_ext): Don't move buffer pointer backwards if
nothing has been put into the buffer yet.
ticket: 1397
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15314 dc483132-0cff-0310-8789-dd5450dbe970
| -rw-r--r-- | src/lib/krb5/krb/ChangeLog | 3 | ||||
| -rw-r--r-- | src/lib/krb5/krb/unparse.c | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index 59ab6802da..e70c3b6f6a 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -9,6 +9,9 @@ * srv_rcache.c (krb5_get_server_rcache): Check for null pointer supplied in place of name. + * unparse.c (krb5_unparse_name_ext): Don't move buffer pointer + backwards if nothing has been put into the buffer yet. + 2003-04-01 Sam Hartman <hartmans@mit.edu> * rd_req.c (krb5_rd_req): If AUTH_CONTEXT_DO_TIME is cleared, diff --git a/src/lib/krb5/krb/unparse.c b/src/lib/krb5/krb/unparse.c index f0e52dceee..6f1a3c9e8b 100644 --- a/src/lib/krb5/krb/unparse.c +++ b/src/lib/krb5/krb/unparse.c @@ -149,7 +149,8 @@ krb5_unparse_name_ext(krb5_context context, krb5_const_principal principal, regi *q++ = COMPONENT_SEP; } - q--; /* Back up last component separator */ + if (i > 0) + q--; /* Back up last component separator */ *q++ = REALM_SEP; cp = krb5_princ_realm(context, principal)->data; |
