Browse code

bb #6805 update

David Raynor authored on 2013/02/16 04:23:42
Showing 1 changed files
... ...
@@ -2271,7 +2271,7 @@ ascii85decode(const char *buf, off_t len, unsigned char *output)
2271 2271
 	while(len > 0) {
2272 2272
 		int byte = (len--) ? (int)*ptr++ : EOF;
2273 2273
 
2274
-		if((byte == '~') && (*ptr == '>'))
2274
+		if((byte == '~') && (len > 0) && (*ptr == '>'))
2275 2275
 			byte = EOF;
2276 2276
 
2277 2277
 		if(byte >= '!' && byte <= 'u') {