Browse code

bb #6805 update

David Raynor authored on 2013/02/16 04:16:53
Showing 1 changed files
... ...
@@ -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') {