Commit Diff


commit - 4492af8432c70fe0b00cc5736f17590c29d79068
commit + cc62643986abd93b4a2dae15c40415c625646fc2
blob - 0e375fdfd43d84b1f15ad53fbe7c555c0447e9dc
blob + 9c71c914e41ecd5f6ad7f529ed63c58c8835dd98
--- libexec/got-read-blob/got-read-blob.c
+++ libexec/got-read-blob/got-read-blob.c
@@ -144,7 +144,8 @@ main(int argc, char *argv[])
 			goto done;
 		}
 
-		if (obj->size <= GOT_PRIVSEP_INLINE_BLOB_DATA_MAX) {
+		if (obj->size + obj->hdrlen <=
+		    GOT_PRIVSEP_INLINE_BLOB_DATA_MAX) {
 			err = got_inflate_to_mem(&buf, &size, f);
 			if (err)
 				goto done;