cygnus merge: sscanf workaround; logs for sam tests
authorKen Raeburn <raeburn@mit.edu>
Sat, 4 May 1996 02:11:35 +0000 (02:11 +0000)
committerKen Raeburn <raeburn@mit.edu>
Sat, 4 May 1996 02:11:35 +0000 (02:11 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7897 dc483132-0cff-0310-8789-dd5450dbe970

src/tests/asn.1/ChangeLog
src/tests/asn.1/utility.c

index e47a2b2c0e0e78b99cb7d1cf7892cdf1a0d19312..ddce14a2ce9bbeab49963ff6102e991548709209 100644 (file)
@@ -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
index 324c98976a92c6bf182b6a4329a535d51bfe1eb2..739d639131f5c5c80640a7afa6d82d92f1bd3f12 100644 (file)
@@ -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;