mirror of
https://github.com/upx/upx.git
synced 2025-08-07 22:46:51 +08:00
Initialize output_capacity for loader
modified: pefile.cpp
This commit is contained in:

committed by
Markus F.X.J. Oberhumer

parent
39442e6282
commit
425b1b44bc
@ -787,7 +787,7 @@ public:
|
||||
int osize = 4 + 2 * nsections; // upper limit for alignments
|
||||
for (unsigned ic = 0; ic < nsections; ic++)
|
||||
osize += sections[ic]->size;
|
||||
output = New(upx_byte, osize);
|
||||
output = New(upx_byte, output_capacity = osize);
|
||||
outputlen = 0;
|
||||
|
||||
// sort the sections by name before adding them all
|
||||
|
Reference in New Issue
Block a user