summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>1996-05-04 02:11:35 +0000
committerKen Raeburn <raeburn@mit.edu>1996-05-04 02:11:35 +0000
commite3b3470fc9a847277e43bed9e87e6b16528a82f2 (patch)
tree92b5f78712de5d73e83e2608e2bcfdccce1360c1 /src/tests
parent8548d03ebe66811bc208992d2cb7e6efc0ec010f (diff)
downloadkrb5-e3b3470fc9a847277e43bed9e87e6b16528a82f2.tar.gz
krb5-e3b3470fc9a847277e43bed9e87e6b16528a82f2.tar.xz
krb5-e3b3470fc9a847277e43bed9e87e6b16528a82f2.zip
cygnus merge: sscanf workaround; logs for sam tests
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7897 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/asn.1/ChangeLog18
-rw-r--r--src/tests/asn.1/utility.c12
2 files changed, 27 insertions, 3 deletions
diff --git a/src/tests/asn.1/ChangeLog b/src/tests/asn.1/ChangeLog
index e47a2b2c0e..ddce14a2ce 100644
--- a/src/tests/asn.1/ChangeLog
+++ b/src/tests/asn.1/ChangeLog
@@ -1,3 +1,21 @@
+Tue Apr 2 20:57:12 1996 Chris Provenzano <proven@mit.edu>
+
+ * utility.c (krb5_data_hex_parse()) : Do a strdup() of string before
+ sending it off to sscanf(), because some systems sscanf can't
+ handle non writeable strings.
+
+Fri Mar 29 03:00:34 1996 Mark Eichin <eichin@cygnus.com>
+
+ * krb5_decode_test.c (main): add tests for krb5_sam_challenge and
+ krb5_sam_response.
+ * krb5_encode_test.c (main): likewise.
+ * ktest.c (ktest_make_sample_sam_challenge,
+ ktest_make_sample_sam_response): new functions, supporting tests
+ of new types.
+ * ktest_equal.c (ktest_equal_sam_challenge,
+ ktest_equal_sam_response): new comparators.
+ * reference_encode.out, trval_reference.out: add data for test cases.
+
Mon Mar 18 21:49:39 1996 Ezra Peisach <epeisach@kangaroo.mit.edu>
* configure.in: Add KRB5_RUN_FLAGS
diff --git a/src/tests/asn.1/utility.c b/src/tests/asn.1/utility.c
index 324c98976a..739d639131 100644
--- a/src/tests/asn.1/utility.c
+++ b/src/tests/asn.1/utility.c
@@ -65,12 +65,18 @@ krb5_error_code krb5_data_hex_parse(d, s)
const char * s;
{
int i, digit;
+ char *copy;
char *pos;
- d->data = (char*)calloc((strlen(s)+1)/3,sizeof(char));
+ /*
+ * Do a strdup() and use that, because some systems can't handle non
+ * writeable strings being passed to sscanf() --proven.
+ */
+ copy = strdup(s);
+ d->data = (char*)calloc((strlen(copy)+1)/3,sizeof(char));
if(d->data == NULL) return ENOMEM;
- d->length = (strlen(s)+1)/3;
- for(i=0,pos=(char*)s; i<d->length; i++,pos+=3){
+ d->length = (strlen(copy)+1)/3;
+ for(i=0,pos=(char*)copy; i<d->length; i++,pos+=3){
if(!sscanf(pos,"%x",&digit)) {
#ifdef KRB5_USE_ISODE
return EINVAL;