... | ... |
@@ -2243,7 +2243,7 @@ ascii85decode(const char *buf, off_t len, unsigned char *output) |
2243 | 2243 |
while(len > 0) { |
2244 | 2244 |
int byte = (len--) ? (int)*ptr++ : EOF; |
2245 | 2245 |
|
2246 |
- if((byte == '~') && !len && (*ptr == '>')) |
|
2246 |
+ if((byte == '~') && (len > 0) && (*ptr == '>')) |
|
2247 | 2247 |
byte = EOF; |
2248 | 2248 |
|
2249 | 2249 |
if(byte >= '!' && byte <= 'u') { |