// HDS
#define IJTYPE_HDS "hds"
-char SDpath[256];
+char SDpath[512];
// Location
#define STATUS 15
{
memset(SDpath, '\0', sizeof(SDpath));
ret = strtok(NULL, token);
- strncpy(SDpath, ret, strlen(ret));
+ strncpy(SDpath, ret, sizeof(SDpath) -1);
LOGDEBUG("sdcard path is %s", SDpath);
mount_param* param = new mount_param(sockfd);
char* msg = 0;
LXT_MESSAGE* packet = (LXT_MESSAGE*)malloc(sizeof(LXT_MESSAGE));
+ if (packet == NULL)
+ return 0;
switch(param->ActionID)
{
free(msg);
msg = 0;
}
- if (packet != NULL) {
- free(packet);
- }
+ free(packet);
if (param)
delete param;