- persistent registrations: malloc - space must include terminating \0
This commit is contained in:
+1
-1
@@ -83,7 +83,7 @@ void register_init(void) {
|
||||
if (strchr(buff, 13)) *strchr(buff, 13)='\0';\
|
||||
if (strlen(buff) > 0) {\
|
||||
size = strlen(buff);\
|
||||
X =(char*)malloc(size);\
|
||||
X =(char*)malloc(size+1);\
|
||||
sts=sscanf(buff,"%s",X);\
|
||||
} else {\
|
||||
X = NULL;\
|
||||
|
||||
Reference in New Issue
Block a user