Projet

Général

Profil

0003-Make-lasso_inflate-output-the-inflated-buffer-size-7.patch

Benjamin Dauvergne, 16 novembre 2022 18:56

Télécharger (1 ko)

Voir les différences:

Subject: [PATCH 03/11] Make lasso_inflate output the inflated buffer size
 (#73313)

 lasso/xml/tools.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
lasso/xml/tools.c
1357 1357
}
1358 1358

  
1359 1359
unsigned char*
1360
lasso_inflate(unsigned char *input, size_t len)
1360
lasso_inflate(unsigned char *input, size_t len, size_t *outlen)
1361 1361
{
1362 1362
	z_stream zstr;
1363 1363
	unsigned char *output;
1364 1364
	int z_err;
1365 1365

  
1366
	*outlen = 0;
1366 1367
	zstr.zalloc = NULL;
1367 1368
	zstr.zfree = NULL;
1368 1369
	zstr.opaque = NULL;
......
1391 1392
	}
1392 1393
	output[zstr.total_out] = 0;
1393 1394
	inflateEnd(&zstr);
1395
	*outlen = zstr.total_out;
1394 1396

  
1395 1397
	return output;
1396 1398
}
1397
-