Skip to content

Commit

Permalink
kamcmd: do binrpc read in non-strict mode
Browse files Browse the repository at this point in the history
- reported by Dmitri Savolainen, GH#145

(cherry picked from commit 6b73ca8)
  • Loading branch information
miconda committed Sep 8, 2015
1 parent 2374556 commit 9d6e5aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions utils/kamcmd/kamcmd.c
Expand Up @@ -892,7 +892,7 @@ static int print_body(struct binrpc_parse_ctx* in_pkt,
read_value:
val.name.s=0;
val.name.len=0;
p=binrpc_read_record(in_pkt, p, end, &val, &ret);
p=binrpc_read_record(in_pkt, p, end, &val, 1, &ret);
if (ret<0){
if (fmt)
putchar('\n');
Expand All @@ -902,7 +902,7 @@ static int print_body(struct binrpc_parse_ctx* in_pkt,
printf("end of message detected\n");
break;
}
fprintf(stderr, "ERROR while parsing the record %d,"
fprintf(stderr, "ERROR:: while parsing the record %d,"
" @%d: %02x : %s\n", rec,
in_pkt->offset, *p, binrpc_error(ret));
goto error;
Expand Down Expand Up @@ -1161,13 +1161,13 @@ static struct binrpc_val* parse_reply_body(int* records,
val.type=BINRPC_T_ALL;
val.name.s=0;
val.name.len=0;
p=binrpc_read_record(in_pkt, p, end, &val, &ret);
p=binrpc_read_record(in_pkt, p, end, &val, 1, &ret);
if (ret<0){
if (ret==E_BINRPC_EOP){
printf("end of message detected\n");
break;
}
fprintf(stderr, "ERROR while parsing the record %d,"
fprintf(stderr, "ERROR: while parsing the record %d,"
" @%d: %02x : %s\n", rec,
in_pkt->offset, *p, binrpc_error(ret));
goto error;
Expand Down

0 comments on commit 9d6e5aa

Please sign in to comment.