VirtualBox

Changeset 2317 in kBuild


Ignore:
Timestamp:
Mar 19, 2009 8:29:03 PM (16 years ago)
Author:
bird
Message:

pathstuff.c: don't use strncpy.

File:
1 edited

Legend:

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

    r1993 r2317  
    101101    char *p;
    102102
     103#if 1 /* bird */
    103104    if (resolve) {
    104 #if 1 /* bird */
    105105        nt_fullpath(filename, w32_path, sizeof(w32_path));
     106    } else {
     107        w32_path[0] = '\0';
     108        strncat(w32_path, filename, sizeof(w32_path));
     109    }
    106110#else   /* !bird */
     111    if (resolve) {
    107112        _fullpath(w32_path, filename, sizeof (w32_path));
    108 #endif  /* !bird */
    109113    } else
    110114        strncpy(w32_path, filename, sizeof (w32_path));
     115#endif  /* !bird */
    111116
    112117    for (p = w32_path; p && *p; p++)
     
    124129        if (p) {
    125130                char *q = w32ify(buf, 0);
     131#if 1  /* bird */
     132                buf[0] = '\0';
     133                strncat(buf, q, len);
     134#else  /* !bird */
    126135                strncpy(buf, q, len);
     136#endif /* !bird */
    127137        }
    128138
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