Ignore:
Timestamp:
Feb 7, 2016, 7:47:38 PM (8 years ago)
Author:
alain
Message:

Fixing two bugs:
1) In the string library: the strcpy() function must copy
the terminating NUL character in the destination buffer.
2) In the malloc library: the free() function must reset
the entry associated to the released buffer in the alloc[array].

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/giet_libs/string.h

    r777 r781  
    1010
    1111////////////////////////////////////////////////////////////////////////////////////////
    12 // This function copies the source string to the dest string.
     12// This function copies the source string to the dest string, including the NUL
     13// terminating character.
    1314// It returns a pointer on the dest string.
    1415////////////////////////////////////////////////////////////////////////////////////////
     
    2324
    2425////////////////////////////////////////////////////////////////////////////////////////
    25 //The strcmp() function compares the two strings s1 and s2.  It returns an integer less than, equal to, or greater than zero if s1 is found, respectively, to be less than, to match, or be greater than s2.
     26// The strcmp() function compares the two strings s1 and s2.  It returns an integer
     27// less than, equal to, or greater than zero if s1 is found, respectively, to be smaller
     28// to match, or be greater than s2.
    2629////////////////////////////////////////////////////////////////////////////////////////
    2730int strcmp(const char * str1, const char * str2);
Note: See TracChangeset for help on using the changeset viewer.