Changeset 1318 for trunk/src


Ignore:
Timestamp:
Mar 17, 2004, 7:49:34 PM (21 years ago)
Author:
bird
Message:

Should not fail on prefixes of more than 5 chars.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/src/lib/io/_tempnam.c

    • Property cvs2svn:cvs-rev changed from 1.4 to 1.5
    r1317 r1318  
    33
    44#include "libc-alias.h"
     5#define __USE_GNU
    56#include <stdio.h>
    67#include <stdlib.h>
     
    3637
    3738  saved_errno = errno;
    38   if (strlen (prefix) > 5)
    39     {
    40       errno = EINVAL;
    41       return NULL;
    42     }
    4339  tmpdir = NULL;
    4440  p = getenv ("TMP");
     
    7975      _itoa (_tmpidx, p, 10);
    8076      strcat (p, ".tmp");
    81       memmove (p, prefix, strlen (prefix));
     77      memmove (p, prefix, strnlen (prefix, 5));
    8278      errno = 0;
    8379      if (access (tmpname, 0) != 0)
Note: See TracChangeset for help on using the changeset viewer.