Skip to content

Commit

Permalink
Исправлена длина буфера в efsio
Browse files Browse the repository at this point in the history
  • Loading branch information
forth32 committed Mar 7, 2016
1 parent 9ae247c commit 9d7b060
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions efsio.c
Expand Up @@ -55,7 +55,9 @@ if (iobuf[0] != 0x4b) {
efs_errno=9999;
return -1;
}
memcpy(respbuf,iobuf+4,iolen-4);
//printf("\n cmd %02x: resplen=%i\n",cmd,iolen-7);
//dump(iobuf+4,iolen-7,0);
memcpy(respbuf,iobuf+4,iolen-7);
return iolen; // ошибок не было
}

Expand Down Expand Up @@ -120,15 +122,12 @@ int efs_closedir(int dirp) {

int ldirp=dirp;
int iolen;
union {
int rsp;
char b[32];
} t;

iolen=send_efs_cmd(EFS2_DIAG_CLOSEDIR,&ldirp,4,&t);
iolen=send_efs_cmd(EFS2_DIAG_CLOSEDIR,&ldirp,4,&rsp);
if (iolen == -1) return -1;
efs_errno=t.rsp;
return t.rsp;
efs_errno=rsp;
return rsp;
}

//****************************************************
Expand Down

0 comments on commit 9d7b060

Please sign in to comment.