OSSP CVS Repository

ossp - Difference in ossp-pkg/uuid/uuid_cli.c versions 1.9 and 1.10
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/uuid/uuid_cli.c 1.9 -> 1.10

--- uuid_cli.c   2004/01/13 19:43:14     1.9
+++ uuid_cli.c   2004/01/15 13:45:18     1.10
@@ -146,6 +146,8 @@
             usage("invalid number of arguments");
         if ((rc = uuid_create(&uuid)) != UUID_RC_OK)
             error(1, "uuid_create: %s", uuid_error(rc));
+        if (strlen(argv[0]) != UUID_LEN_STR)
+            error(1, "invalid length of UUID string representation");
         if ((rc = uuid_parse(uuid, argv[0])) != UUID_RC_OK)
             error(1, "uuid_parse: %s", uuid_error(rc));
         if ((rc = uuid_dump(uuid, &cp)) != UUID_RC_OK)
@@ -165,6 +167,8 @@
             error(1, "uuid_create: %s", uuid_error(rc));
         if (argc == 1) {
             /* load initial UUID for setting old generator state */
+            if (strlen(argv[0]) != UUID_LEN_STR)
+                error(1, "invalid length of UUID string representation");
             if ((rc = uuid_parse(uuid, argv[0])) != UUID_RC_OK)
                 error(1, "uuid_parse: %s", uuid_error(rc));
         }

CVSTrac 2.0.1