Skip to content

Commit

Permalink
fix the rest of type conversions for printing
Browse files Browse the repository at this point in the history
  • Loading branch information
vlm committed Jan 27, 2019
1 parent 2e2cb79 commit 47cb79f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions asn1-tools/unber/libasn1_unber_tool.c
Expand Up @@ -153,15 +153,15 @@ process_deeper(const char *fname, input_stream_t *ibs, output_stream_t *os,
osprintfError(os,
"%s: Too long TL sequence (%zd >= %zd) at %lld. "
"Broken or maliciously constructed file\n",
fname, tblen, limit, ibs->bytesRead(ibs));
fname, tblen, limit, (long long)ibs->bytesRead(ibs));
return PD_FAILED;
}

if(tblen >= (ssize_t)sizeof(tagbuf)) {
osprintfError(os,
"%s: Too long TL sequence (%zd bytes) at %lld. "
"Broken or maliciously constructed file\n",
fname, tblen, ibs->bytesRead(ibs));
fname, tblen, (long long)ibs->bytesRead(ibs));
return PD_FAILED;
}

Expand All @@ -171,8 +171,8 @@ process_deeper(const char *fname, input_stream_t *ibs, output_stream_t *os,
if(limit > 0 || expect_eoc) {
osprintfError(os,
"%s: Unexpected end of file (TL)"
" at %zu\n",
fname, (size_t)ibs->bytesRead(ibs));
" at %lld\n",
fname, (long long)ibs->bytesRead(ibs));
return PD_FAILED;
} else {
return PD_EOF;
Expand All @@ -189,8 +189,8 @@ process_deeper(const char *fname, input_stream_t *ibs, output_stream_t *os,
case -1:
osprintfError(os,
"%s: Fatal error decoding tag"
" at %zu\n",
fname, (size_t)ibs->bytesRead(ibs));
" at %lld\n",
fname, (long long)ibs->bytesRead(ibs));
return PD_FAILED;
case 0:
/* More data expected */
Expand Down Expand Up @@ -318,7 +318,7 @@ print_TL(output_stream_t *os, int fin, off_t offset, int level, int constr,
osprintf(os, constr ? ((tlv_len == -1) ? "I" : "C") : "P");

/* Print out the offset of this boundary, even if closing tag */
if(!minimalistic) osprintf(os, " O=\"%lld\"", offset);
if(!minimalistic) osprintf(os, " O=\"%lld\"", (long long)offset);

osprintf(os, " T=\"%s\"", ber_tlv_tag_string(tlv_tag));

Expand Down

0 comments on commit 47cb79f

Please sign in to comment.