VirtualBox

Changeset 2454 in kBuild


Ignore:
Timestamp:
Jul 7, 2011 7:51:25 PM (13 years ago)
Author:
bird
Message:

kmk: Applied r1.13 to w32/pathstuff.c, fixing crash if PATH ends with a quote. Fixes #93.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/w32/pathstuff.c

    r2317 r2454  
    11/* Path conversion for Windows pathnames.
    22Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
    3 2007 Free Software Foundation, Inc.
     32007, 2009 Free Software Foundation, Inc.
    44This file is part of GNU Make.
    55
     
    5252
    5353    /* is this a multi-element Path ? */
     54    /* FIXME: Perhaps use ":;\"" in strpbrk to convert all quotes to
     55       delimiters as well, as a way to handle quoted directories in
     56       PATH?  */
    5457    for (p = Path, etok = strpbrk(p, ":;");
    5558         etok;
     
    7780                ;
    7881            etok = strpbrk(p, ":;");        /* find next delimiter */
    79             *etok = to_delim;
    80             p = ++etok;
     82            if (etok) {
     83                *etok = to_delim;
     84                p = ++etok;
     85            } else
     86                p += strlen(p);
    8187        } else {
    8288            /* found another one, no drive letter */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette