Index: trunk/i386/libsaio/stringTable.c =================================================================== --- trunk/i386/libsaio/stringTable.c (revision 1365) +++ trunk/i386/libsaio/stringTable.c (revision 1366) @@ -323,12 +323,19 @@ } if ((strlen(match) == key_len) && strncmp(match, key, key_len) == 0) { - *matchval = value; + // create a new string + char* newstr = malloc(value_len + 1); + strncpy(newstr, value, value_len); + newstr[value_len] = 0; + + *matchval = newstr; *len = value_len; retval = true; /* Continue to look for this key; last one wins. */ } } + + return retval; }