diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-08-10 14:34:21 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-08-10 14:51:33 +0100 |
commit | 235da38eee8ca585f3a0e585ec1dd52fbc110ad5 (patch) | |
tree | 69a3f3e93663e77d443961e95d0255b483be0f7d /tools/intel_error_decode.c | |
parent | ddb1995cf73e7daac8abee1305944460c0da636a (diff) |
intel_error_decode: Skip inflation for uncompressed ascii85 streams
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tools/intel_error_decode.c')
-rw-r--r-- | tools/intel_error_decode.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/intel_error_decode.c b/tools/intel_error_decode.c index 7959fff5..8cbbe846 100644 --- a/tools/intel_error_decode.c +++ b/tools/intel_error_decode.c @@ -507,7 +507,7 @@ end: return zstream.total_out / 4; } -static int ascii85_decode(const char *in, uint32_t **out) +static int ascii85_decode(const char *in, uint32_t **out, bool inflate) { int len = 0, size = 1024; @@ -538,6 +538,9 @@ static int ascii85_decode(const char *in, uint32_t **out) (*out)[len++] = v; } + if (!inflate) + return len; + return zlib_inflate(out, len); } @@ -638,8 +641,8 @@ read_data_file(FILE *file) } } - if (line[0] == ':') { - count = ascii85_decode(line+1, &data); + if (line[0] == ':' || line[0] == '~') { + count = ascii85_decode(line+1, &data, line[0] == ':'); if (count == 0) { fprintf(stderr, "ASCII85 decode failed.\n"); exit(1); |