- char*string = (char*)malloc(strlen(access)+strlen(s)+3);
- int l = sprintf(string, "[%s]%s", access, s);
+ char*string = (char*)malloc(strlen(access)+strlen(s)+7);
+ if(!s)
+ sprintf(string, "[%s]NULL", access, s);
+ else if(!*s)
+ sprintf(string, "[%s]\"\"", access, s);
+ else
+ sprintf(string, "[%s]", access, s);
+