Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 2d93b77e2cc668659984974ef56833379602d259
Ticket: 218888ffffffffffffffffffffffffffffffffff
Package version numbers not validated correctly
User & Date: nobody on 2000-10-26 01:07:14
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    OriginalBugID: 2539 Bug
    Version: 8.2b2
    SubmitDate: '1999-08-12'
    LastModified: '1999-09-20'
    Severity: MED
    Status: Released
    Submitter: techsupp
    ChangedBy: hobbs
    OS: Solaris
    Machine: Other
    FixedDate: '1999-09-20'
    FixedInVersion: 8.3b1
    ClosedDate: '2000-10-25'
    
    
    Name:
    
    Hemang Lavana
    
    
    CustomShell:
    
    Modified the function CheckVersion to flag an error whenever two consecutive dots appear in a version number.
    
    
    Comments:
    
    This problem is also present in 8.0.5.
    
    
    ReproducibleScript:
    
    The command "package provide test 1.0..1" runs successfully without any
    
        errors, even though the version number has two consecutive dots in it.
    
    
    DesiredBehavior:
    
    An error should be reported, when a package version number is specified
    
        with consecutive dots in it (ex: 1.0..1).
    
    
    Patch:
    
    *** tclPkg.c-org        Thu Aug 12 09:06:27 1999
    
    --- tclPkg.c    Thu Aug 12 09:51:07 1999
    
    ***************
    
    *** 871,884 ****
    
                                     * by dots. */
    
      {
    
          char *p = string;
    
    
          if (!isdigit(UCHAR(*p))) {        /* INTL: digit */
    
            goto error;
    
          }
    
          for (p++; *p != 0; p++) {
    
    !       if (!isdigit(UCHAR(*p)) && (*p != '.')) { /* INTL: digit */
    
                goto error;
    
            }
    
          }
    
          if (p[-1] != '.') {
    
            return TCL_OK;
    
    --- 871,888 ----
    
                                     * by dots. */
    
      {
    
          char *p = string;
    
    +     char prevChar;
    
    
          if (!isdigit(UCHAR(*p))) {        /* INTL: digit */
    
            goto error;
    
          }
    
    +     prevChar = *p;
    
          for (p++; *p != 0; p++) {
    
    !       if (!isdigit(UCHAR(*p)) &&
    
    !               ((*p != '.') || (prevChar == '.'))) { /* INTL: digit */
    
                goto error;
    
            }
    
    +         prevChar = *p;
    
          }
    
          if (p[-1] != '.') {
    
            return TCL_OK;
    
    
    PatchFiles:
    
    tclPkg.c
    
    
    
    
    Added to 8.3b1 with tests. 
    -- 09/20/1999 hobbs
    
  4. foundin changed to: "obsolete: 8.2b2"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to: "Package version numbers not validated correctly"
  11. type changed to: "Bug"